소스 검색

Fixed bugs in display decorations. Opening properties dialogs caused errors and dialogs would not close. Ported from develbranch_6

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32807 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 16 년 전
부모
커밋
529c510045
1개의 변경된 파일8개의 추가작업 그리고 9개의 파일을 삭제
  1. 8 9
      gui/wxpython/gui_modules/gdialogs.py

+ 8 - 9
gui/wxpython/gui_modules/gdialogs.py

@@ -374,24 +374,23 @@ class DecorationDialog(wx.Dialog):
         self.parent.MapWindow.overlays[self.ovlId]['propwin'] = propwin
 
         # change parameters for item in layers list in render.Map
-        # "Use mouse..." (-m) flag causes GUI freeze, trac #119
+        # "Use mouse..." (-m) flag causes GUI freeze and is pointless here, trac #119
+        
         try:
             self.parent.MapWindow.overlays[self.ovlId]['cmd'].remove('-m')
         except ValueError:
             pass
-        
+            
         self.parent.Map.ChangeOverlay(id=self.ovlId, type=self.name,
                                       command=self.parent.MapWindow.overlays[self.ovlId]['cmd'],
                                       l_active=self.parent.MapWindow.overlays[self.ovlId]['layer'].IsActive(),
                                       l_render=False, l_hidden=True)
-
-        if self.name == 'legend' and \
-                params and \
-                not self.btnOK.IsEnabled():
-            self.btnOK.Enable()
+        if  self.name == 'legend':
+            if params and not self.btnOK.IsEnabled():
+                self.btnOK.Enable()
         
-        self.SetTitle(_('Legend of raster map <%s>') % \
-                      utils.GetLayerNameFromCmd(self.parent.MapWindow.overlays[self.ovlId]['cmd']))
+            #self.SetTitle(_('Legend of raster map <%s>') % \
+            #              utils.GetLayerNameFromCmd(self.parent.MapWindow.overlays[self.ovlId]['cmd']))
             
 class TextLayerDialog(wx.Dialog):
     """