Add logic to “TryAgainLater” if setting the Top of an EditItem fails.
This commit is contained in:
parent
10c8ba5eab
commit
62368e725b
@ -1347,6 +1347,12 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _TryAgainLater = false;
|
||||
public bool TryAgainLater
|
||||
{
|
||||
get { return _TryAgainLater; }
|
||||
set { _TryAgainLater = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Handles movement of the EditItems
|
||||
/// </summary>
|
||||
@ -1363,11 +1369,12 @@ namespace Volian.Controls.Library
|
||||
//}
|
||||
//if (MyID > _StartingID)
|
||||
// Console.WriteLine("{0}--------------- {1} Top = {2} Bottom {3}", WatchThisIndent, MyID, Top, Bottom);
|
||||
if (MyStepPanel.ItemMoving == 0)
|
||||
if (MyStepPanel.ItemMoving == 0 && !TryAgainLater)
|
||||
{
|
||||
//vlnStackTrace.ScrollInStack();
|
||||
return; // If 0 - Indicates scrolling which requires no action.
|
||||
}
|
||||
TryAgainLater = false;
|
||||
//ShowMe("Move");
|
||||
if (MyItemInfo == null)
|
||||
return;
|
||||
@ -1678,6 +1685,15 @@ namespace Volian.Controls.Library
|
||||
nextEditItem.LastMethodsPush(string.Format("AdjustLocation {0}", MyID));
|
||||
nextEditItem._NextDownEditItemPath = _NextDownEditItemPath;
|
||||
nextEditItem.Top = bottom;
|
||||
// We found that the 64 Bit version of windows did not always set the Top correctly.
|
||||
// We also found that if we could simply watch for the next time that it was set, we
|
||||
// could set the Flag "TryAgainLater" the change would propogate the changes through its
|
||||
// children and siblings.
|
||||
if (nextEditItem.Top != bottom)
|
||||
{
|
||||
nextEditItem.TryAgainLater = true;
|
||||
_MyLog.InfoFormat("Setting nextEditItem.Top = bottom for ID {0}, ({1}) did not work, TryAgainLater", nextEditItem.MyID, nextEditItem.MyItemInfo.SearchPath);
|
||||
}
|
||||
nextEditItem.LastMethodsPop();
|
||||
MyStepPanel.ItemMoving--;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user