From b1b5d2c24dd796f18576195951fc84f925e83a51 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 23 Jan 2018 18:30:14 +0000 Subject: [PATCH] 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 --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 1a74b713..3d7db71e 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -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(); } /// @@ -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)