From 4153579253cafc474e2b949b656a3f2c53cb5407 Mon Sep 17 00:00:00 2001 From: cstamford Date: Thu, 30 Jan 2014 04:35:28 +0000 Subject: [PATCH] add confirmation to delete brush / part --- Starstructor/GUI/MainWindow.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Starstructor/GUI/MainWindow.cs b/Starstructor/GUI/MainWindow.cs index 0759ec0..f2e6ea2 100644 --- a/Starstructor/GUI/MainWindow.cs +++ b/Starstructor/GUI/MainWindow.cs @@ -1106,7 +1106,11 @@ private void deletePartToolStripMenuItem_Click(object sender, EventArgs e) { EditorMapPart part = m_mapNodeMap[PartTreeView.SelectedNode] as EditorMapPart; - if (part != null && PromptGenericYesNo("", "") == DialogResult.Yes) + if (part != null && PromptGenericYesNo("Are you sure you wish to delete the part \"" + + part.Name + + "\"? This action cannot be undone. " + + "\nNote: This will not delete the layer image files..", + "Delete part confirmation") == DialogResult.Yes) { m_mapNodeMap.Remove(PartTreeView.SelectedNode); @@ -1124,7 +1128,11 @@ private void deleteBrushToolStripMenuItem_Click(object sender, EventArgs e) { EditorBrush brush = m_brushNodeMap[BrushesTreeView.SelectedNode]; - if (brush != null && PromptGenericYesNo("", "") == DialogResult.Yes) + if (brush != null && + PromptGenericYesNo("Are you sure you wish to delete the brush: \"" + + brush.Comment + + "\"? This action cannot be undone.", + "Delete brush confirmation") == DialogResult.Yes) { m_brushNodeMap.Remove(BrushesTreeView.SelectedNode); m_parent.ActiveFile.BlockMap.Remove(brush);