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:
Rich 2012-10-25 00:41:39 +00:00
parent 762f1a9916
commit f685efbf5c

View File

@ -418,17 +418,19 @@ namespace Volian.Controls.Library
Cursor tmp = Cursor.Current; Cursor tmp = Cursor.Current;
Cursor.Current = Cursors.WaitCursor; Cursor.Current = Cursors.WaitCursor;
int top = TopMostEditItem.Top;// This doesn't work - this is since the last time it was expanded. 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; Colapsing = true;
// Hide Children // Hide Children
HideChildren(); HideChildren();
// Adjust Positions // Adjust Positions
ExpandPrefix = Top - top; int topOffsetAfter = TopMostEditItem.Top + MyStepPanel.VerticalScroll.Value;
ExpandSuffix = BottomMostEditItem.Bottom - Bottom; ExpandPrefix = topOffset - topOffsetAfter;
if (Top != top) //ExpandSuffix = BottomMostEditItem.Bottom - Bottom;
if (topOffsetAfter != topOffset)
{ {
LastMethodsPush(string.Format("Colapse {0}", MyID)); LastMethodsPush(string.Format("Colapse {0}", MyID));
MyStepPanel.ItemMoving++; MyStepPanel.ItemMoving++;
Top = top; Top += (topOffset - topOffsetAfter);
MyStepPanel.ItemMoving--; MyStepPanel.ItemMoving--;
LastMethodsPop(); LastMethodsPop();
} }
@ -448,7 +450,7 @@ namespace Volian.Controls.Library
Cursor tmp = Cursor.Current; Cursor tmp = Cursor.Current;
Cursor.Current = Cursors.WaitCursor; Cursor.Current = Cursors.WaitCursor;
if (!_Loading && MyExpandingStatus == ExpandingStatus.No) if (!_Loading && MyExpandingStatus == ExpandingStatus.No)
Expand(ContentType >= 20000); Expand((ContentType >= 20000) || MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format);
Cursor.Current = tmp; Cursor.Current = tmp;
} }
@ -843,7 +845,7 @@ namespace Volian.Controls.Library
//OLD: _MyvlnExpander.Attachment = (itemInfo.MyContent.ContentPartCount == 0); //OLD: _MyvlnExpander.Attachment = (itemInfo.MyContent.ContentPartCount == 0);
break; break;
case 2: // High level steps with children can expand 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; break;
default://Procedures cannot expand, because they automatically expand default://Procedures cannot expand, because they automatically expand
CanExpand = false; CanExpand = false;