Browse Source

wxGUI: fix mapdisplay statusbar coordinates formating
precision default 2


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38302 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 years ago
parent
commit
cefcb24c12
2 changed files with 5 additions and 3 deletions
  1. 4 2
      gui/wxpython/gui_modules/mapdisp.py
  2. 1 1
      gui/wxpython/gui_modules/preferences.py

+ 4 - 2
gui/wxpython/gui_modules/mapdisp.py

@@ -989,8 +989,10 @@ class MapFrame(wx.Frame):
                                                       precision, s, precision, n), 0)
                                                       precision, s, precision, n), 0)
                     else:
                     else:
                         ewres, nsres = region['ewres'], region['nsres']
                         ewres, nsres = region['ewres'], region['nsres']
-                        self.statusbar.SetStatusText("%s - %s, %s - %s (%s, %s)" %
-                                                     (w, e, s, n, ewres, nsres), 0)
+                        self.statusbar.SetStatusText("%.*f - %.*f, %.*f - %.*f (%.*f, %.*f)" %
+                                                     (precision, w, precision, e,
+                                                      precision, s, precision, n,
+                                                      precision, ewres, precision, nsres), 0)
             # enable long help
             # enable long help
             self.StatusbarEnableLongHelp()
             self.StatusbarEnableLongHelp()
 
 

+ 1 - 1
gui/wxpython/gui_modules/preferences.py

@@ -124,7 +124,7 @@ class Settings:
                     },
                     },
                 'format' : {
                 'format' : {
                     'll'  : 'DMS',
                     'll'  : 'DMS',
-                    'precision' : 6,
+                    'precision' : 2,
                     },
                     },
                 },
                 },
             #
             #