B2018-005 - Changes to Tables not being saved if the user selects a button from the Ribbon that creates a step while a cell is still in edit mode. This has been corrected

This commit is contained in:
Rich 2018-01-23 18:30:14 +00:00
parent 397eb67b10
commit b1b5d2c24d

View File

@ -1071,6 +1071,8 @@ namespace Volian.Controls.Library
}
else if (contenttype == 21040)
{
if (_MyEditItem.MyItemInfo.IsTable) // B2018-005 Save Current Changes to the table
_MyEditItem.MyParentEditItem.Select();
_MyEditItem.AddChild((E_FromType)fromtype, 20040);
}
else if (InsertingTable(contenttype))
@ -1363,11 +1365,15 @@ namespace Volian.Controls.Library
}
private void btnInsBefore_Click(object sender, EventArgs e)
{
if (_MyEditItem.MyItemInfo.IsTable) // B2018-005 Save Current Changes to the table
_MyEditItem.MyParentEditItem.Select();
_MyEditItem.AddSiblingBefore();
}
private void btnInsAfter_Click(object sender, EventArgs e)
{
if (_MyEditItem.MyItemInfo.IsTable) // B2018-005 Save Current Changes to the table
_MyEditItem.MyParentEditItem.Select();
_MyEditItem.AddSiblingAfter();
}
/// <summary>
@ -3312,10 +3318,10 @@ namespace Volian.Controls.Library
private void btnTranRefresh_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
ProcedureInfo.ResetTranCounters();
ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo);
this.Cursor = Cursors.Default;
MessageBox.Show(this, string.Format("Checked {0} transitions, fixed {1} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
MessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void btnRefObjRefresh_Click(object sender, System.EventArgs e)
{
@ -3533,12 +3539,16 @@ namespace Volian.Controls.Library
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
if (_MyEditItem.MyItemInfo.IsTable) // B2018-005 Save Current Changes to the table
_MyEditItem.MyParentEditItem.Select();
MyEditItem.PasteSiblingAfter(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
}
private void btnPasteBefore_Click(object sender, EventArgs e)
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
if (_MyEditItem.MyItemInfo.IsTable) // B2018-005 Save Current Changes to the table
_MyEditItem.MyParentEditItem.Select();
MyEditItem.PasteSiblingBefore(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
}
private void btnStepPaste_Click(object sender, EventArgs e)