Fixed bug that caused second level RNOs not to be located properly

This commit is contained in:
Rich 2009-05-06 17:20:02 +00:00
parent 2ac80ea219
commit 56fdefa924

View File

@ -221,21 +221,25 @@ namespace Volian.Controls.Library
_MyStepPanel.ItemMoving++;
//Left = _MyParentStepItem.ItemLeft + RNOLevel * colR;
//ItemLocation = new Point(_MyParentStepItem.ItemLeft + RNOLevel * colR, _MyParentStepItem.Top);
LastMethodsPush(string.Format("set_MyParentStepItem RNO Right {0}", MyID));
ItemLocation = new Point(_MyParentStepItem.ItemLeft + RNOLevel * colR, _MyParentStepItem.Top);
int top = _MyParentStepItem.FindTop(_MyParentStepItem.Top);
if (top != _MyParentStepItem.Top)
{
_MyParentStepItem.LastMethodsPush(string.Format("set_MyParentStepItem RNO {0}", MyID));
_MyParentStepItem.LastMethodsPush(string.Format("set_MyParentStepItem RNO Right {0}", MyID));
_MyParentStepItem.Top = top;
Top = top;
_MyParentStepItem.LastMethodsPop();
Top = top;
}
LastMethodsPop();
_MyStepPanel.ItemMoving--;
}
else
{
_MyStepPanel.ItemMoving++;
LastMethodsPush(string.Format("set_MyParentStepItem RNO Below {0} {1} {2}", MyID, _MyParentStepItem.BottomMostStepItem.MyID, _MyParentStepItem.BottomMostStepItem.Bottom));
TextLocation = new Point(_MyParentStepItem.TextLeft, _MyParentStepItem.BottomMostStepItem.Bottom);
LastMethodsPop();
//TextLocation = new Point(_MyParentStepItem.TextLeft, FindTop(_MyParentStepItem.Top));
_MyStepPanel.ItemMoving--;
}
@ -290,6 +294,7 @@ namespace Volian.Controls.Library
, FindTop(0), FindRight()
, LastMethodsEmpty ? _MyStepPanel._LastAdjust : _LastMethods.Peek(), this
, _NextDownStepItemPath);
//vlnStackTrace.ShowStackLocal(string.Format("ShowMe {0}",MyID),3, 8);
//vlnStackTrace.ShowStack();
//vlnStackTrace.ScrollInStack();
}
@ -1206,12 +1211,17 @@ namespace Volian.Controls.Library
}
if (RNOBelow) // Adjust substeps first
{
//Console.WriteLine("RNOBelow");
AdjustLocation();
MoveRNO();
}
else // Adjust RNO First
{
if (RNORight)
{
//Console.WriteLine("RNORight");
MoveRNO();
}
AdjustLocation();
}
Moving = false;
@ -1230,7 +1240,8 @@ namespace Volian.Controls.Library
{
if (_MyRNOStepItems != null)
{
return _MyRNOStepItems[0].Left == Left;
return _MyRNOStepItems[0].RNOLevel > _MyItemInfo.ColumnMode;
//return _MyRNOStepItems[0].Left == Left;
}
return false;
}
@ -1241,7 +1252,8 @@ namespace Volian.Controls.Library
{
if (_MyRNOStepItems != null)
{
return _MyRNOStepItems[0].Left != Left;
return _MyRNOStepItems[0].RNOLevel <= _MyItemInfo.ColumnMode;
//return _MyRNOStepItems[0].Left != Left;
}
return false;
}
@ -1254,22 +1266,25 @@ namespace Volian.Controls.Library
{
//if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("\r\n'Adjust RNO',{0},'Move',{1}", MyID, _RNO[0].MyID);
StepItem rnoTop = _MyRNOStepItems[0].TopMostStepItem;
rnoTop.LastMethodsPush(string.Format("StepItem_Move RNO {0}", MyID));
if (RNOLevel >= _MyItemInfo.ColumnMode)
if (rnoTop.RNOLevel <= _MyItemInfo.ColumnMode)
{
StepItem tmpBottom = this;
if (_MyAfterStepItems != null) tmpBottom = _MyAfterStepItems[_MyAfterStepItems.Count - 1].BottomMostStepItem;
//StepItem tmpBottom = this;
//if (_MyAfterStepItems != null) tmpBottom = _MyAfterStepItems[_MyAfterStepItems.Count - 1].BottomMostStepItem;
_MyStepPanel.ItemMoving++;
rnoTop.Top = tmpBottom.Bottom;
rnoTop.LastMethodsPush(string.Format("StepItem_Move RNO Right {0}", rnoTop.MyID));
//rnoTop.Top = tmpBottom.Bottom;
rnoTop.Top = Top;
rnoTop.LastMethodsPop();
_MyStepPanel.ItemMoving--;
}
else
{
_MyStepPanel.ItemMoving++;
rnoTop.Top = Top;
rnoTop.LastMethodsPush(string.Format("StepItem_Move RNO Below {0} {1} {2}", rnoTop.MyID, BottomMostStepItem.MyID, BottomMostStepItem.Bottom));
rnoTop.Top = BottomMostStepItem.Bottom;
rnoTop.LastMethodsPop();
_MyStepPanel.ItemMoving--;
}
rnoTop.LastMethodsPop();
}
}
}