This commit is contained in:
blitzmann
2015-09-27 18:16:54 -04:00
parent e07c162453
commit 2617143330

View File

@@ -1641,7 +1641,17 @@ class FitItem(SFItem.SFBrowserItem):
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: