Change parent of fit deletion dialog
Try out tip mentioned in https://github.com/wxWidgets/Phoenix/issues/1343
This commit is contained in:
@@ -344,13 +344,12 @@ class FitItem(SFItem.SFBrowserItem):
|
||||
if mstate.GetModifiers() == wx.MOD_SHIFT or mstate.MiddleIsDown():
|
||||
self.deleteFit()
|
||||
else:
|
||||
dlg = wx.MessageDialog(
|
||||
self, "Do you really want to delete this fit?", "Confirm Delete",
|
||||
wx.YES | wx.NO | wx.ICON_QUESTION)
|
||||
if dlg.ShowModal() == wx.ID_YES:
|
||||
self.deleteFit()
|
||||
else:
|
||||
dlg.Destroy()
|
||||
with wx.MessageDialog(
|
||||
self.GetTopLevelParent(), "Do you really want to delete this fit?", "Confirm Delete",
|
||||
wx.YES | wx.NO | wx.ICON_QUESTION
|
||||
) as dlg:
|
||||
if dlg.ShowModal() == wx.ID_YES:
|
||||
self.deleteFit()
|
||||
|
||||
def deleteFit(self, event=None):
|
||||
pyfalog.debug("Deleting ship fit.")
|
||||
|
||||
Reference in New Issue
Block a user