From 62368e725bb763aa2d0625119b9bfe22fe3f27ff Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 17 Apr 2012 17:24:26 +0000 Subject: [PATCH] =?UTF-8?q?Add=20logic=20to=20=E2=80=9CTryAgainLater?= =?UTF-8?q?=E2=80=9D=20if=20setting=20the=20Top=20of=20an=20EditItem=20fai?= =?UTF-8?q?ls.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/EditItem.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 1d9ab027..0f2d73aa 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -1347,6 +1347,12 @@ namespace Volian.Controls.Library } } } + private bool _TryAgainLater = false; + public bool TryAgainLater + { + get { return _TryAgainLater; } + set { _TryAgainLater = value; } + } /// /// Handles movement of the EditItems /// @@ -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--; }