Fixed crash on double click of usage list item
Fix missing end message if continuous section.
This commit is contained in:
parent
73084c36eb
commit
2812d5b9d7
@ -77,7 +77,6 @@ namespace Volian.Controls.Library
|
||||
this.groupPanelBtns.Style.BorderRightWidth = 1;
|
||||
this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.groupPanelBtns.Style.BorderTopWidth = 1;
|
||||
this.groupPanelBtns.Style.Class = "";
|
||||
this.groupPanelBtns.Style.CornerDiameter = 4;
|
||||
this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
@ -86,12 +85,10 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelBtns.StyleMouseDown.Class = "";
|
||||
this.groupPanelBtns.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelBtns.StyleMouseOver.Class = "";
|
||||
this.groupPanelBtns.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.groupPanelBtns.TabIndex = 25;
|
||||
//
|
||||
@ -133,7 +130,6 @@ namespace Volian.Controls.Library
|
||||
this.groupPanelLibDocs.Style.BorderRightWidth = 1;
|
||||
this.groupPanelLibDocs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.groupPanelLibDocs.Style.BorderTopWidth = 1;
|
||||
this.groupPanelLibDocs.Style.Class = "";
|
||||
this.groupPanelLibDocs.Style.CornerDiameter = 4;
|
||||
this.groupPanelLibDocs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.groupPanelLibDocs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
@ -142,12 +138,10 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelLibDocs.StyleMouseDown.Class = "";
|
||||
this.groupPanelLibDocs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelLibDocs.StyleMouseOver.Class = "";
|
||||
this.groupPanelLibDocs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.superTooltipLibDocs.SetSuperTooltip(this.groupPanelLibDocs, new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.groupPanelLibDocs.TabIndex = 27;
|
||||
@ -326,7 +320,6 @@ namespace Volian.Controls.Library
|
||||
this.groupPanelUsages.Style.BorderRightWidth = 1;
|
||||
this.groupPanelUsages.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.groupPanelUsages.Style.BorderTopWidth = 1;
|
||||
this.groupPanelUsages.Style.Class = "";
|
||||
this.groupPanelUsages.Style.CornerDiameter = 4;
|
||||
this.groupPanelUsages.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.groupPanelUsages.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
@ -335,12 +328,10 @@ namespace Volian.Controls.Library
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelUsages.StyleMouseDown.Class = "";
|
||||
this.groupPanelUsages.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.groupPanelUsages.StyleMouseOver.Class = "";
|
||||
this.groupPanelUsages.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.groupPanelUsages.TabIndex = 31;
|
||||
this.groupPanelUsages.Text = "Usages";
|
||||
|
@ -260,10 +260,13 @@ namespace Volian.Controls.Library
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
private bool _ProcessingSelectedValueChanged = false;
|
||||
private void listBoxUsages_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_InitializingLibDocList)
|
||||
{
|
||||
if (_ProcessingSelectedValueChanged) return;
|
||||
_ProcessingSelectedValueChanged = true;
|
||||
if (listBoxUsages.SelectedIndex == -1) return;
|
||||
DocumentInfo di = LibDocList[listBoxLibDocs.SelectedIndex];
|
||||
// see if the library document actually has data - data migration may have created a 'null' content within the
|
||||
@ -274,6 +277,7 @@ namespace Volian.Controls.Library
|
||||
return;
|
||||
}
|
||||
_DisplayTabControl.OpenItem(di.LibraryDocumentUsageList[listBoxUsages.SelectedIndex]);
|
||||
_ProcessingSelectedValueChanged = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -61,7 +61,16 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (yLocation < yTopMargin) // continuous section
|
||||
{
|
||||
if (ChildrenBelow == null || ChildrenBelow.Count == 0) return 0;
|
||||
if (ChildrenBelow == null || ChildrenBelow.Count == 0)
|
||||
{
|
||||
// see if there is an end message. This is stored in the helper - if there is,
|
||||
// we need to be sure that there is room for it.
|
||||
if (MyPageHelper.BottomMessage != null)
|
||||
{
|
||||
if (mySize + yEndMsg <= yWithinMargins) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
vlnParagraph firstChild = ChildrenBelow[0];
|
||||
|
||||
// This is a continuous section. There may be cases where the user put a manual page
|
||||
|
@ -707,6 +707,12 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_MyHelper.BottomMessage != null)
|
||||
{
|
||||
_MyHelper.DrawBottomMessage(cb);
|
||||
localYPageStart += 12;
|
||||
myParagraph.YBottomMost += 24; // two lines.
|
||||
}
|
||||
float tmplocal = localYPageStart;
|
||||
_NoBreakYOffset = myParagraph.YBottomMost;
|
||||
float yOffset = localYPageStart - yTopMargin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user