Revert to the previous code for TryAgainLater
This commit is contained in:
parent
58564667ea
commit
0e41d02be0
@ -1392,8 +1392,6 @@ namespace Volian.Controls.Library
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void EditItem_Move(object sender, EventArgs e)
|
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;
|
int newTop = Top - MyStepPanel.TopMostEditItem.Top;
|
||||||
if (_LastTop == newTop) return;
|
if (_LastTop == newTop) return;
|
||||||
_LastTop = newTop;
|
_LastTop = newTop;
|
||||||
@ -1411,7 +1409,7 @@ namespace Volian.Controls.Library
|
|||||||
//vlnStackTrace.ScrollInStack();
|
//vlnStackTrace.ScrollInStack();
|
||||||
return; // If 0 - Indicates scrolling which requires no action.
|
return; // If 0 - Indicates scrolling which requires no action.
|
||||||
}
|
}
|
||||||
if(TryAgainLater) TryAgainLater = false;
|
TryAgainLater = false;
|
||||||
//ShowMe("Move");
|
//ShowMe("Move");
|
||||||
if (MyItemInfo == null)
|
if (MyItemInfo == null)
|
||||||
return;
|
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
|
// 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.
|
// 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.
|
// 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;
|
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)
|
if (nextEditItem.Top != bottom)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("'Adjust3',{0},'{1}','{2}',{3},{4},{5},{6},{7}", nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath, nextEditItem.MyItemInfo.DisplayText,
|
_MyLog.InfoFormat("'TryAgainLater',{0},{1},{2},{3},{4},'{5}'",
|
||||||
// oldTop, bottom, nextEditItem.Top, MyStepPanel.VerticalScroll.Value, MyStepPanel.DisplayRectangle.Height);
|
oldTop, nextEditItem.Top, bottom, MyStepPanel.Height, nextEditItem.MyID, nextEditItem.MyItemInfo.ShortPath);
|
||||||
//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);
|
|
||||||
nextEditItem.TryAgainLater = true;
|
nextEditItem.TryAgainLater = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
nextEditItem.LastMethodsPop();
|
nextEditItem.LastMethodsPop();
|
||||||
MyStepPanel.ItemMoving--;
|
MyStepPanel.ItemMoving--;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user