From 0e41d02be0b0c1dbafb57624aafffb4940072b60 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 11 Apr 2014 19:00:34 +0000 Subject: [PATCH] Revert to the previous code for TryAgainLater --- PROMS/Volian.Controls.Library/EditItem.cs | 30 +++-------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 95548471..c3103982 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -1392,8 +1392,6 @@ namespace Volian.Controls.Library /// private void EditItem_Move(object sender, EventArgs e) { - //if (MyID == 2) Volian.Base.Library.vlnStackTrace.ShowStack("Item 2", Top); - //Console.WriteLine("'EditItem_Move',{0},'{1}','{2}',{3},{4},,{5},{6}", MyID, MyItemInfo.ShortPath, MyItemInfo.DisplayText, _LastTop, Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); int newTop = Top - MyStepPanel.TopMostEditItem.Top; if (_LastTop == newTop) return; _LastTop = newTop; @@ -1411,7 +1409,7 @@ namespace Volian.Controls.Library //vlnStackTrace.ScrollInStack(); return; // If 0 - Indicates scrolling which requires no action. } - if(TryAgainLater) TryAgainLater = false; + TryAgainLater = false; //ShowMe("Move"); if (MyItemInfo == null) return; @@ -1728,35 +1726,13 @@ namespace Volian.Controls.Library // it appears that setting the top doesn't always work. The logic below checks to see if it does // not work and trys some other things so that the EditItem will be moved to the correct place. // As a last attempt, the EditItem is added to a list to be refreshed from a timer on MyStepPanel. - //Console.WriteLine("'Adjust1',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath,nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); nextEditItem.Top = bottom; - Application.DoEvents(); - //if(nextEditItem.MyID == 760) - // Console.WriteLine("'Move760',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); - //Console.WriteLine("'Adjust2',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); if (nextEditItem.Top != bottom) { - //Console.WriteLine("'Adjust3',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); - //MyStepPanel.AutoScroll = false; - nextEditItem.Top = bottom; - //Console.WriteLine("'Adjust4',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); - //MyStepPanel.AutoScroll = true; - if (nextEditItem.Top != bottom) - { - _MyLog.WarnFormat("'TryAgainLater',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); - //Console.WriteLine("'TryAgainLater',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText, - // oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height); - //Console.WriteLine("'TryAgainLater2','OldTop',{0},'NextEditItem',{1},'bottom',{2},'Height',{3},'ID',{4},'Location','{5}'", - //oldTop, nextEditItem.Top, bottom, MyStepPanel.Height, nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath); + _MyLog.InfoFormat("'TryAgainLater',{0},{1},{2},{3},{4},'{5}'", + oldTop, nextEditItem.Top, bottom, MyStepPanel.Height, nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath); nextEditItem.TryAgainLater = true; } - } nextEditItem.LastMethodsPop(); MyStepPanel.ItemMoving--; }