Skip to content

Commit

Permalink
Fix #363
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Sep 27, 2015
1 parent e07c162 commit 2617143
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion gui/shipBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,17 @@ def deleteBtnCB(self):
self.RestoreEditButton()
return

self.deleteFit()
# to prevent accidental deletion, give dialog confirmation unless shift is depressed
if wx.GetMouseState().ShiftDown() or wx.GetMouseState().MiddleDown():
self.deleteFit()
else:
dlg = wx.MessageDialog(self,
"Do you really want to delete this fit?",
"Confirm Delete", wx.OK | wx.CANCEL | wx.ICON_QUESTION)
result = dlg.ShowModal()
dlg.Destroy()
if result == wx.ID_OK:
self.deleteFit()

def deleteFit(self, event=None):
if self.deleted:
Expand Down

0 comments on commit 2617143

Please sign in to comment.