浏览代码

wxGUI: revert some recent decoration changes. Dialogs for barscale and
legend cannot be shown as modal - in the result d.barscale and
d.legend are not selectable.
(merge from relbr64, https://trac.osgeo.org/grass/changeset/35133)


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

Martin Landa 16 年之前
父节点
当前提交
5a1f572243
共有 2 个文件被更改,包括 11 次插入6 次删除
  1. 4 3
      gui/wxpython/gui_modules/gdialogs.py
  2. 7 3
      gui/wxpython/gui_modules/mapdisp.py

+ 4 - 3
gui/wxpython/gui_modules/gdialogs.py

@@ -354,9 +354,10 @@ class DecorationDialog(wx.Dialog):
             if mapName:
             if mapName:
                 # enable 'OK' button
                 # enable 'OK' button
                 self.btnOK.Enable()
                 self.btnOK.Enable()
-                # set title
-                self.SetTitle(_('Legend of raster map <%s>') % \
-                              mapName)
+                if name == 'legend':
+                    # set title
+                    self.SetTitle(_('Legend of raster map <%s>') % \
+                                      mapName)
         
         
     def _CreateOverlay(self):
     def _CreateOverlay(self):
         if not self.parent.Map.GetOverlay(self.ovlId):
         if not self.parent.Map.GetOverlay(self.ovlId):

+ 7 - 3
gui/wxpython/gui_modules/mapdisp.py

@@ -3889,7 +3889,9 @@ class MapFrame(wx.Frame):
                                       ctrltxt = _("scale object"))
                                       ctrltxt = _("scale object"))
 
 
         self.dialogs['barscale'].CentreOnParent()
         self.dialogs['barscale'].CentreOnParent()
-        self.dialogs['barscale'].ShowModal()
+        ### dialog cannot be show as modal - in the result d.barscale is not selectable
+        ### self.dialogs['barscale'].ShowModal()
+        self.dialogs['barscale'].Show()
         self.MapWindow.mouse['use'] = 'pointer'        
         self.MapWindow.mouse['use'] = 'pointer'        
 
 
     def OnAddLegend(self, event):
     def OnAddLegend(self, event):
@@ -3917,8 +3919,10 @@ class MapFrame(wx.Frame):
                                       checktxt = _("Show/hide legend"),
                                       checktxt = _("Show/hide legend"),
                                       ctrltxt = _("legend object")) 
                                       ctrltxt = _("legend object")) 
 
 
-        self.dialogs['legend'].CentreOnParent()
-        self.dialogs['legend'].ShowModal()
+        self.dialogs['legend'].CentreOnParent() 
+        ### dialog cannot be show as modal - in the result d.legend is not selectable
+        ### self.dialogs['legend'].ShowModal()
+        self.dialogs['legend'].Show()
         self.MapWindow.mouse['use'] = 'pointer'
         self.MapWindow.mouse['use'] = 'pointer'
 
 
     def OnAddText(self, event):
     def OnAddText(self, event):