Parcourir la source

wxGUI/rlisetup: dissociate the managed window from the manager ('wx.aui.AuiManager' instance) before destroy wizard window (#1196)

Tomas Zigo il y a 4 ans
Parent
commit
505f156c05
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      gui/wxpython/rlisetup/wizard.py

+ 7 - 1
gui/wxpython/rlisetup/wizard.py

@@ -136,11 +136,11 @@ class RLIWizard(object):
                 self._cleanup()
             dlg.Destroy()
         else:
+            self._cleanup()
             self.wizard.Destroy()
             GMessage(parent=self.parent,
                      message=_("r.li.setup wizard canceled. "
                                "Configuration file not created."))
-            self._cleanup()
 
     def _write_confile(self):
         """Write the configuration file"""
@@ -476,6 +476,12 @@ class RLIWizard(object):
         self.moving.width = ''
         self.moving.height = ''
         self.moving.boxtype = ''
+        for page in (self.drawsampleframepage,
+                     self.regions,
+                     self.drawsampleunitspage,
+                     self.vectorareas):
+            if page.mapPanel:
+                page.mapPanel._mgr.UnInit()
 
 
 class FirstPage(TitledPage):