Skip to content
Snippets Groups Projects
Commit f72b2ffe authored by Paul McCarthy's avatar Paul McCarthy
Browse files

A couple of yields and destroys to make the overlay-load MessageDialog

display on linux/gtk
parent 8b6215c0
No related branches found
No related tags found
No related merge requests found
...@@ -283,6 +283,7 @@ def loadOverlays(paths, loadFunc='default', errorFunc='default', saveDir=True): ...@@ -283,6 +283,7 @@ def loadOverlays(paths, loadFunc='default', errorFunc='default', saveDir=True):
if defaultLoad: if defaultLoad:
loadDlg.Close() loadDlg.Close()
loadDlg.Destroy()
if saveDir and len(paths) > 0: if saveDir and len(paths) > 0:
fslsettings.write('loadOverlayLastDir', op.dirname(paths[-1])) fslsettings.write('loadOverlayLastDir', op.dirname(paths[-1]))
...@@ -333,6 +334,10 @@ def interactiveLoadOverlays(fromDir=None, **kwargs): ...@@ -333,6 +334,10 @@ def interactiveLoadOverlays(fromDir=None, **kwargs):
return [] return []
paths = dlg.GetPaths() paths = dlg.GetPaths()
dlg.Destroy()
del dlg
images = loadOverlays(paths, saveDir=saveFromDir, **kwargs) images = loadOverlays(paths, saveDir=saveFromDir, **kwargs)
return images return images
......
...@@ -59,6 +59,7 @@ class SimpleMessageDialog(wx.Dialog): ...@@ -59,6 +59,7 @@ class SimpleMessageDialog(wx.Dialog):
self.Fit() self.Fit()
self.Refresh() self.Refresh()
self.Update() self.Update()
wx.Yield()
class TimeoutDialog(SimpleMessageDialog): class TimeoutDialog(SimpleMessageDialog):
...@@ -128,7 +129,7 @@ class ProcessingDialog(SimpleMessageDialog): ...@@ -128,7 +129,7 @@ class ProcessingDialog(SimpleMessageDialog):
self.SetFocus() self.SetFocus()
self.Update() self.Update()
result = self.task(*self.args, **self.kwargs) result = self.task(*self.args, **self.kwargs)
self.Close() self.Close()
self.Destroy() self.Destroy()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment