From a099d27b868f6af17d12ea4354488787134f99c9 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 13 May 2025 08:19:23 -0400 Subject: [PATCH] C2025-032 Add check if user is sure want to paste replace section. --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 5fcb43b6..140a7a23 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -2074,7 +2074,6 @@ namespace Volian.Controls.Library case "Paste Procedure After": case "Paste Section": case "Paste Section Before": - case "Replace Existing Section": case "Paste Section After": case "Paste Step": case "Paste Step Before": @@ -2083,8 +2082,18 @@ namespace Volian.Controls.Library case "Paste Subsection": tv_NodePaste(mi.Text); break; + case "Replace Existing Section": + //C2025-032 - Add check if user is sure want to paste replace section + DialogResult ovewriteExPS = FlexibleMessageBox.Show("This will overwrite the selected section with the one you copied, would you like to overwrite it?\r\n\r\nSelecting 'Cancel' will cancel the paste action.", "Overwrite the section?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + + if (ovewriteExPS == DialogResult.Cancel) break; + else + { + tv_NodePaste(mi.Text); + break; + } case "Replace Existing Procedure": - DialogResult ovewriteEx = FlexibleMessageBox.Show("This will overwrite the selected procedure with then one you copied, would you like to overwrite it?\r\n\r\nSelecting 'Cancel' will cancel the paste action.", "Overwrite the procedure?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes; + DialogResult ovewriteEx = FlexibleMessageBox.Show("This will overwrite the selected procedure with the one you copied, would you like to overwrite it?\r\n\r\nSelecting 'Cancel' will cancel the paste action.", "Overwrite the procedure?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes; if (ovewriteEx == DialogResult.Cancel) break; else -- 2.47.2