Skip to content

Commit

Permalink
add confirmation to delete brush / part
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamford committed Jan 30, 2014
1 parent 0e39c2d commit 4153579
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Starstructor/GUI/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down

0 comments on commit 4153579

Please sign in to comment.