Sfoglia il codice sorgente

wxGUI georectifier: save colour correctly, reset mapcoordlist on reload

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42620 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 15 anni fa
parent
commit
1a4219abf1
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      gui/wxpython/gui_modules/georect.py

+ 7 - 2
gui/wxpython/gui_modules/georect.py

@@ -1025,7 +1025,12 @@ class GCP(wx.Frame):
 
 
     def ReloadGCPs(self, event):
     def ReloadGCPs(self, event):
         """!Reload data from file"""
         """!Reload data from file"""
-        self.list.LoadData()
+
+ 	# delete all items in mapcoordlist
+ 	del self.mapcoordlist
+ 	self.mapcoordlist = []
+ 
+	self.list.LoadData()
     
     
     def OnFocus(self, event):
     def OnFocus(self, event):
         # self.grwiz.SwitchEnv('new')
         # self.grwiz.SwitchEnv('new')
@@ -1767,7 +1772,7 @@ class GrSettingsDialog(wx.Dialog):
 
 
     def UpdateSettings(self):
     def UpdateSettings(self):
         UserSettings.Set(group='georect', key='symbol', subkey='color',
         UserSettings.Set(group='georect', key='symbol', subkey='color',
-                         value=wx.FindWindowById(self.symbol['color']).GetColour())
+                         value=tuple(wx.FindWindowById(self.symbol['color']).GetColour()))
         UserSettings.Set(group='georect', key='symbol', subkey='width',
         UserSettings.Set(group='georect', key='symbol', subkey='width',
                          value=wx.FindWindowById(self.symbol['width']).GetValue())
                          value=wx.FindWindowById(self.symbol['width']).GetValue())