Browse Source

Moved profile toolbar back to profile window. All buttons except transect pertain to profile window, not to map display window.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33109 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 16 năm trước cách đây
mục cha
commit
cf6ea127b9

+ 2 - 2
gui/wxpython/gui_modules/profile.py

@@ -89,8 +89,8 @@ class ProfileFrame(wx.Frame):
         #
         # Add toolbar
         #
-        toolbar = toolbars.ProfileToolbar(parent=self, mapdisplay=self.mapwin, map=self.Map).GetToolbar()
-        self.SetToolBar(toolbar)
+        self.toolbar = toolbars.ProfileToolbar(parent=self, tbframe=self).GetToolbar()
+        self.SetToolBar(self.toolbar)
         
         #
         # Set the size & cursor

+ 6 - 7
gui/wxpython/gui_modules/toolbars.py

@@ -1100,18 +1100,17 @@ class VDigitToolbar(AbstractToolbar):
 class ProfileToolbar(AbstractToolbar):
     """
     Toolbar for profiling raster map
-    """
-    def __init__(self, parent, mapdisplay, map):
-        self.parent     = parent
-        self.mapcontent = map
-        self.mapdisplay = mapdisplay
+    """ 
+    def __init__(self, parent, tbframe):
+        self.parent  = parent # GCP
+        self.tbframe = tbframe
 
-        self.toolbar = wx.ToolBar(parent=self.mapdisplay, id=wx.ID_ANY)
+        self.toolbar = wx.ToolBar(parent=self.tbframe, id=wx.ID_ANY)
 
         # self.SetToolBar(self.toolbar)
         self.toolbar.SetToolBitmapSize(globalvar.toolbarSize)
 
-        self.InitToolbar(self.mapdisplay, self.toolbar, self.ToolbarData())
+        self.InitToolbar(self.tbframe, self.toolbar, self.ToolbarData())
 
         # realize the toolbar
         self.toolbar.Realize()