[GRASS-SVN] r41253 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 1 04:43:58 EST 2010
Author: martinl
Date: 2010-03-01 04:43:57 -0500 (Mon, 01 Mar 2010)
New Revision: 41253
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI: fix georectifier
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py 2010-03-01 08:56:59 UTC (rev 41252)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py 2010-03-01 09:43:57 UTC (rev 41253)
@@ -187,15 +187,14 @@
#
# start map display
#
- self.xy_mapdisp = mapdisp.MapFrame(self.gcpmgr, title=_("Set ground control points (GCPs)"),
+ self.xy_mapdisp = mapdisp.MapFrame(self.gcpmgr, name = "GRMapWindow",
size=globalvar.MAP_WINDOW_SIZE,
toolbars=["georect"],
Map=self.Map, lmgr=self.parent)
self.xy_mapdisp.SetTitle(_("GRASS GIS Map Display: 1" +
" - Location: " + self.newlocation +
" (source location)"))
- self.xy_mapdisp.SetName("GRMapWindow")
-
+
self.gcpmgr.SetMapDisplay(self.xy_mapdisp)
self.mapwin = self.xy_mapdisp.MapWindow
@@ -657,17 +656,16 @@
wx.FindWindowById(wx.ID_FORWARD).Enable(True)
class GCP(wx.Frame):
- """
+ """!
Manages ground control points for georectifying. Calculates RMS statics.
Calls i.rectify or v.transform to georectify map.
"""
+ def __init__(self, parent, grwiz, mapdisp = None, id = wx.ID_ANY,
+ title = _("Define/manage ground control points"),
+ size = (625, 300)):
- def __init__(self, parent, grwiz, mapdisp=None, id=wx.ID_ANY,
- title=_("Define/manage ground control points"),
- size=wx.DefaultSize):
+ wx.Frame.__init__(self, parent, id, title, size = size, name = "GCPFrame")
- wx.Frame.__init__(self, parent, id, title, size=(625, 300))
-
self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
#
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-03-01 08:56:59 UTC (rev 41252)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-03-01 09:43:57 UTC (rev 41253)
@@ -88,10 +88,9 @@
"""
def __init__(self, parent=None, id=wx.ID_ANY, title=_("GRASS GIS - Map display"),
- pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE, toolbars=["map"],
tree=None, notebook=None, lmgr=None, page=None,
- Map=None, auimgr=None):
+ Map=None, auimgr=None, **kwargs):
"""
Main map display window with toolbars, statusbar and
DrawWindow
@@ -99,9 +98,11 @@
@param toolbars array of activated toolbars, e.g. ['map', 'digit']
@param tree reference to layer tree
@param notebook control book ID in Layer Manager
- @param mgr Layer Manager
+ @param lmgr Layer Manager
@param page notebook page with layer tree
@param Map instance of render.Map
+ @param auimgs AUI manager
+ @param kwargs wx.Frame attribures
"""
self._layerManager = lmgr # Layer Manager object
self.Map = Map # instance of render.Map
@@ -122,14 +123,15 @@
"pencil" : wx.StockCursor(wx.CURSOR_PENCIL),
"sizenwse": wx.StockCursor(wx.CURSOR_SIZENWSE)
}
-
- wx.Frame.__init__(self, parent, id, title, pos, size, style)
- self.SetName("MapWindow")
-
+
+ if not kwargs.has_key('name'):
+ kwargs['name'] = 'MapWindow'
+ wx.Frame.__init__(self, parent, id, title, style = style, **kwargs)
+
#
# set the size & system icon
#
- self.SetClientSize(size)
+ self.SetClientSize(self.GetSize())
self.iconsize = (16, 16)
self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2010-03-01 08:56:59 UTC (rev 41252)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2010-03-01 09:43:57 UTC (rev 41253)
@@ -2592,6 +2592,7 @@
enable = True
else:
enable = False
+
if self.parent.GetName() == 'MapWindow':
toolbar = self.parent.toolbars['map']
elif self.parent.GetName() == 'GRMapWindow':
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2010-03-01 08:56:59 UTC (rev 41252)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2010-03-01 09:43:57 UTC (rev 41253)
@@ -101,6 +101,9 @@
def OnTool(self, event):
"""!Tool selected"""
+ if self.parent.GetName() == "GCPFrame":
+ return
+
if self.parent.toolbars['vdigit']:
# update vdigit toolbar (unselect currently selected tool)
id = self.parent.toolbars['vdigit'].GetAction(type='id')
More information about the grass-commit
mailing list