Compare commits

...

3 Commits

2 changed files with 12 additions and 7 deletions

View File

@@ -897,11 +897,7 @@ namespace Volian.Controls.Library
// B2023-072: Don't crash if annotation type was deleted for the restore annotation // B2023-072: Don't crash if annotation type was deleted for the restore annotation
if (ai == null) if (ai == null)
{ {
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID); FlexibleMessageBox.Show(this, "Annotation Type was deleted, cannot restore Annotation Type\r\nCopy text from window in Change Details and paste into new annotation to restore the text.", "Annotation Type Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning);
if (ati == null)
{
FlexibleMessageBox.Show(this, "Annotation Type was deleted, cannot restore Annotation Type\r\nCopy text from window in Change Details and paste into new annotation to restore the text.", "Annotation Type Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
return; return;
} }
OnAnnotationRestored(ai, ai.MyItem); OnAnnotationRestored(ai, ai.MyItem);

View File

@@ -2074,7 +2074,6 @@ namespace Volian.Controls.Library
case "Paste Procedure After": case "Paste Procedure After":
case "Paste Section": case "Paste Section":
case "Paste Section Before": case "Paste Section Before":
case "Replace Existing Section":
case "Paste Section After": case "Paste Section After":
case "Paste Step": case "Paste Step":
case "Paste Step Before": case "Paste Step Before":
@@ -2083,8 +2082,18 @@ namespace Volian.Controls.Library
case "Paste Subsection": case "Paste Subsection":
tv_NodePaste(mi.Text); tv_NodePaste(mi.Text);
break; 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": 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; if (ovewriteEx == DialogResult.Cancel) break;
else else