[GRASS-SVN] r53711 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 6 07:27:51 PST 2012
Author: martinl
Date: 2012-11-06 07:27:51 -0800 (Tue, 06 Nov 2012)
New Revision: 53711
Modified:
grass/trunk/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI/legend: enable 'resize' button when map is defined
(merge r53707 from relbr64)
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-11-06 15:26:31 UTC (rev 53710)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-11-06 15:27:51 UTC (rev 53711)
@@ -591,8 +591,7 @@
resize.SetToolTipString(_("Click and drag on the map display to set legend"
" size and position and then press OK"))
resize.SetName('resize')
- if self.parent.IsPaneShown('3d'):
- resize.Disable()
+ resize.Disable()
box.Add(item = resize, proportion = 0, flag = wx.ALIGN_CENTRE|wx.ALL, border = 5)
sizer.Add(item = box, proportion = 0,
flag = wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, border = 5)
@@ -648,8 +647,11 @@
if name == 'legend':
mapName, found = GetLayerNameFromCmd(self.parent.MapWindow.overlays[self.ovlId]['cmd'])
if found:
- # enable 'OK' button
+ # enable 'OK' and 'Resize' button
self.btnOK.Enable()
+ if not self.parent.IsPaneShown('3d'):
+ self.FindWindowByName('resize').Enable()
+
# set title
self.SetTitle(_('Legend of raster map <%s>') % \
mapName)
@@ -692,7 +694,7 @@
self.parent.MapWindow.overlays[self.ovlId]['propwin'].Show()
def OnResize(self, event):
- if self.FindWindowByName('resize').GetValue():
+ if self.FindWindowByName('resize').GetValue():
self.parent.SwitchTool(self.parent.toolbars['map'], event)
self.parent.MapWindow.SetCursor(self.parent.cursors["cross"])
self.parent.MapWindow.mouse['use'] = 'legend'
@@ -751,6 +753,8 @@
if self.name == 'legend':
if params and not self.btnOK.IsEnabled():
self.btnOK.Enable()
+ if not self.parent.IsPaneShown('3d'):
+ self.FindWindowByName('resize').Enable()
class TextLayerDialog(wx.Dialog):
"""
More information about the grass-commit
mailing list