Corrected Logic in ProcessRoTanChanges to save transitions

Fixed logic in AddSubStep to show menu if no current substeps exist, even if the step has a table
This commit is contained in:
Rich
2010-10-20 14:45:12 +00:00
parent 18b9fb3c2e
commit 1e0564f35a
2 changed files with 23 additions and 8 deletions

View File

@@ -1168,9 +1168,19 @@ namespace Volian.Controls.Library
private void AddSubStep()
{
if (MyStepItem.NextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID)
StepItem nextDownStepItem = MyStepItem.NextDownStepItem;
bool skipTable = false;
// If the step has a table, move past it before adding a substep
if (nextDownStepItem != null && nextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID &&
nextDownStepItem.MyItemInfo.IsTablePart)
{
nextDownStepItem = nextDownStepItem.NextDownStepItem;
skipTable = true;
}
if (nextDownStepItem != null && nextDownStepItem.MyItemInfo.MyParent.ItemID == MyStepItem.MyID)
{
MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
if(skipTable) MyStepRTB.StepRTB_ArrowPressed(E_ArrowKeys.CtrlDown);
InsertSiblingBeforeOrAfter("before");
}
else