Use VerticalScroll.Value to determine absolute location of RTBItem on the Step Panel.
Deviation Document 3 Column Format (Dev_Format) support. Auto-expand HLS for Deviation Document format. B2012-265
This commit is contained in:
parent
762f1a9916
commit
f685efbf5c
@ -418,17 +418,19 @@ namespace Volian.Controls.Library
|
||||
Cursor tmp = Cursor.Current;
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
int top = TopMostEditItem.Top;// This doesn't work - this is since the last time it was expanded.
|
||||
int topOffset = TopMostEditItem.Top + MyStepPanel.VerticalScroll.Value;
|
||||
Colapsing = true;
|
||||
// Hide Children
|
||||
HideChildren();
|
||||
// Adjust Positions
|
||||
ExpandPrefix = Top - top;
|
||||
ExpandSuffix = BottomMostEditItem.Bottom - Bottom;
|
||||
if (Top != top)
|
||||
int topOffsetAfter = TopMostEditItem.Top + MyStepPanel.VerticalScroll.Value;
|
||||
ExpandPrefix = topOffset - topOffsetAfter;
|
||||
//ExpandSuffix = BottomMostEditItem.Bottom - Bottom;
|
||||
if (topOffsetAfter != topOffset)
|
||||
{
|
||||
LastMethodsPush(string.Format("Colapse {0}", MyID));
|
||||
MyStepPanel.ItemMoving++;
|
||||
Top = top;
|
||||
Top += (topOffset - topOffsetAfter);
|
||||
MyStepPanel.ItemMoving--;
|
||||
LastMethodsPop();
|
||||
}
|
||||
@ -448,7 +450,7 @@ namespace Volian.Controls.Library
|
||||
Cursor tmp = Cursor.Current;
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
if (!_Loading && MyExpandingStatus == ExpandingStatus.No)
|
||||
Expand(ContentType >= 20000);
|
||||
Expand((ContentType >= 20000) || MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format);
|
||||
Cursor.Current = tmp;
|
||||
}
|
||||
|
||||
@ -843,7 +845,7 @@ namespace Volian.Controls.Library
|
||||
//OLD: _MyvlnExpander.Attachment = (itemInfo.MyContent.ContentPartCount == 0);
|
||||
break;
|
||||
case 2: // High level steps with children can expand
|
||||
CanExpand = itemInfo.IsHigh && itemInfo.HasChildren; // TemporaryFormat.IsHigh(item); ;
|
||||
CanExpand = itemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && itemInfo.HasChildren; // TemporaryFormat.IsHigh(item); ;
|
||||
break;
|
||||
default://Procedures cannot expand, because they automatically expand
|
||||
CanExpand = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user