소스 검색

g.mapsets: dialog must be destroyed, app.MainLoop seems not necessary here; remove unused imports, whitespace clean up (merge from trunk, https://trac.osgeo.org/grass/changeset/65291)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65295 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 년 전
부모
커밋
633560ed85
1개의 변경된 파일6개의 추가작업 그리고 12개의 파일을 삭제
  1. 6 12
      gui/wxpython/modules/mapsets_picker.py

+ 6 - 12
gui/wxpython/modules/mapsets_picker.py

@@ -1,33 +1,27 @@
 #!/usr/bin/env python
 
-import os
-import sys
-import pwd
-
-from grass.script import core as grass
-
 import wx
-import wx.lib.mixins.listctrl as listmix
 
-from core.gcmd import RunCommand 
+from core.gcmd import RunCommand
 from core.utils import _, GuiModuleMain
 from gui_core.preferences import MapsetAccess
 
+
 def main():
     app = wx.App()
 
     dlg = MapsetAccess(parent = None)
     dlg.CenterOnScreen()
-        
+
     if dlg.ShowModal() == wx.ID_OK:
         ms = dlg.GetMapsets()
         RunCommand('g.mapsets',
                    parent = None,
                    mapset = '%s' % ','.join(ms),
                    operation = 'set')
-    
-    app.MainLoop()
+
+    dlg.Destroy()
+
 
 if __name__ == "__main__":
     GuiModuleMain(main)
-