소스 검색

wxGUI: another small fixes for https://trac.osgeo.org/grass/ticket/2001

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56816 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 년 전
부모
커밋
53dbd32eee
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      gui/wxpython/gui_core/preferences.py

+ 5 - 2
gui/wxpython/gui_core/preferences.py

@@ -1361,8 +1361,9 @@ class PreferencesDialog(PreferencesBaseDialog):
         """!Load EPSG codes from the file"""
         """!Load EPSG codes from the file"""
         win = self.FindWindowById(self.winId['projection:statusbar:projFile'])
         win = self.FindWindowById(self.winId['projection:statusbar:projFile'])
         path = win.GetValue()
         path = win.GetValue()
-
+        wx.BeginBusyCursor()
         self.epsgCodeDict = ReadEpsgCodes(path)
         self.epsgCodeDict = ReadEpsgCodes(path)
+
         epsgCombo = self.FindWindowById(self.winId['projection:statusbar:epsg'])
         epsgCombo = self.FindWindowById(self.winId['projection:statusbar:epsg'])
         if type(self.epsgCodeDict) == type(''):
         if type(self.epsgCodeDict) == type(''):
             wx.MessageBox(parent = self,
             wx.MessageBox(parent = self,
@@ -1372,11 +1373,13 @@ class PreferencesDialog(PreferencesBaseDialog):
             epsgCombo.SetItems([])
             epsgCombo.SetItems([])
             epsgCombo.SetValue('')
             epsgCombo.SetValue('')
             self.FindWindowById(self.winId['projection:statusbar:proj4']).SetValue('')
             self.FindWindowById(self.winId['projection:statusbar:proj4']).SetValue('')
+            wx.EndBusyCursor()
             return
             return
         
         
-        choices = map(str, self.epsgCodeDict.keys())
+        choices = map(str, sorted(self.epsgCodeDict.keys()))
 
 
         epsgCombo.SetItems(choices)
         epsgCombo.SetItems(choices)
+        wx.EndBusyCursor()
         code = 4326 # default
         code = 4326 # default
         win = self.FindWindowById(self.winId['projection:statusbar:proj4'])
         win = self.FindWindowById(self.winId['projection:statusbar:proj4'])
         if code in self.epsgCodeDict:
         if code in self.epsgCodeDict: