Browse Source

wxGUI/rdigit: small fixes for Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63314 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 years ago
parent
commit
2d7522af20
2 changed files with 4 additions and 1 deletions
  1. 1 0
      gui/wxpython/rdigit/controller.py
  2. 3 1
      gui/wxpython/rdigit/toolbars.py

+ 1 - 0
gui/wxpython/rdigit/controller.py

@@ -352,6 +352,7 @@ class RDigitController(wx.EvtHandler):
         """After selecting new raster, shows dialog to choose name,
         """After selecting new raster, shows dialog to choose name,
         background map and type of the new map."""
         background map and type of the new map."""
         dlg = NewRasterDialog(parent=self._mapWindow)
         dlg = NewRasterDialog(parent=self._mapWindow)
+        dlg.CenterOnParent()
         if dlg.ShowModal() == wx.ID_OK:
         if dlg.ShowModal() == wx.ID_OK:
             try:
             try:
                 self._createNewMap(mapName=dlg.GetMapName(),
                 self._createNewMap(mapName=dlg.GetMapName(),

+ 3 - 1
gui/wxpython/rdigit/toolbars.py

@@ -143,13 +143,15 @@ class RDigitToolbar(BaseToolbar):
         self._mapSelectionCombo.SetSelection(idx)
         self._mapSelectionCombo.SetSelection(idx)
 
 
     def UpdateCellValues(self, values=None):
     def UpdateCellValues(self, values=None):
+        orig = self._valueCombo.GetValue()
         if not values:
         if not values:
-            values = [self._valueCombo.GetValue()]
+            values = [orig]
         for value in values:
         for value in values:
             self._cellValues.add(str(value))
             self._cellValues.add(str(value))
 
 
         valList = sorted(list(self._cellValues), key=float)
         valList = sorted(list(self._cellValues), key=float)
         self._valueCombo.SetItems(valList)
         self._valueCombo.SetItems(valList)
+        self._valueCombo.SetStringSelection(orig)
 
 
     def _cellValueChanged(self):
     def _cellValueChanged(self):
         value = self._valueCombo.GetValue()
         value = self._valueCombo.GetValue()