[GRASS-SVN] r42987 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 4 02:13:01 EDT 2010
Author: martinl
Date: 2010-08-04 06:13:01 +0000 (Wed, 04 Aug 2010)
New Revision: 42987
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxGUI/nviz: set page id to 0
(merge r42986 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-08-04 06:06:59 UTC (rev 42986)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2010-08-04 06:13:01 UTC (rev 42987)
@@ -1260,8 +1260,8 @@
mapname = None
raststr = ''
vectstr = ''
- rcmd = ['r.what', '--q']
- vcmd = ['v.what', '--q']
+ rcmd = ['r.what', '--v']
+ vcmd = ['v.what', '--v']
for layer in self.tree.GetSelections():
type = self.tree.GetPyData(layer)[0]['maplayer'].GetType()
dcmd = self.tree.GetPyData(layer)[0]['cmd']
@@ -1338,8 +1338,7 @@
del self.tmpreg
def QueryVector(self, x, y):
- """
- Query vector map layer features
+ """!Query vector map layer features
Attribute data of selected vector object are displayed in GUI dialog.
Data can be modified (On Submit)
@@ -1423,39 +1422,53 @@
point = wx.GetMousePosition()
toolsmenu = wx.Menu()
- # Add items to the menu
- display = wx.MenuItem(parentMenu=toolsmenu, id=wx.ID_ANY,
- text=_("Query raster/vector map(s) (display mode)"),
- kind=wx.ITEM_CHECK)
- toolsmenu.AppendItem(display)
- self.Bind(wx.EVT_MENU, self.OnQueryDisplay, display)
- numLayers = 0
- for layer in self.tree.GetSelections():
- type = self.tree.GetPyData(layer)[0]['maplayer'].GetType()
- if type in ('raster', 'rgb', 'his',
- 'vector', 'thememap', 'themechart'):
- numLayers += 1
- if numLayers < 1:
- display.Enable(False)
-
- if action == "displayAttrb":
- display.Check(True)
-
- modify = wx.MenuItem(parentMenu=toolsmenu, id=wx.ID_ANY,
- text=_("Query vector map (edit mode)"),
- kind=wx.ITEM_CHECK)
- toolsmenu.AppendItem(modify)
- self.Bind(wx.EVT_MENU, self.OnQueryModify, modify)
+
+ # add items to the menu
if self.toolbars['nviz']:
+ raster = wx.MenuItem(parentMenu = toolsmenu, id = wx.ID_ANY,
+ text = _("Query surface (raster map)"),
+ kind = wx.ITEM_CHECK)
+ toolsmenu.AppendItem(raster)
+ self.Bind(wx.EVT_MENU, self.OnQueryDisplay, raster)
+ if action == "displayAttrb":
+ display.Check(True)
+ vector = wx.MenuItem(parentMenu = toolsmenu, id = wx.ID_ANY,
+ text = _("Query vector map"),
+ kind = wx.ITEM_CHECK)
+ toolsmenu.AppendItem(vector)
+ self.Bind(wx.EVT_MENU, self.OnQueryDisplay, vector)
+ else:
+ display = wx.MenuItem(parentMenu=toolsmenu, id=wx.ID_ANY,
+ text=_("Query raster/vector map(s) (display mode)"),
+ kind=wx.ITEM_CHECK)
+ toolsmenu.AppendItem(display)
+ self.Bind(wx.EVT_MENU, self.OnQueryDisplay, display)
+ numLayers = 0
+ for layer in self.tree.GetSelections():
+ type = self.tree.GetPyData(layer)[0]['maplayer'].GetType()
+ if type in ('raster', 'rgb', 'his',
+ 'vector', 'thememap', 'themechart'):
+ numLayers += 1
+ if numLayers < 1:
+ display.Enable(False)
+
+ if action == "displayAttrb":
+ display.Check(True)
+
+ modify = wx.MenuItem(parentMenu=toolsmenu, id=wx.ID_ANY,
+ text=_("Query vector map (edit mode)"),
+ kind=wx.ITEM_CHECK)
+ toolsmenu.AppendItem(modify)
+ self.Bind(wx.EVT_MENU, self.OnQueryModify, modify)
modify.Enable(False)
- digitToolbar = self.toolbars['vdigit']
- if self.tree.layer_selected:
- layer_selected = self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer']
- if layer_selected.GetType() != 'vector' or \
- (digitToolbar and \
- digitToolbar.GetLayer() == layer_selected):
- modify.Enable(False)
+ digitToolbar = self.toolbars['vdigit']
+ if self.tree.layer_selected:
+ layer_selected = self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer']
+ if layer_selected.GetType() != 'vector' or \
+ (digitToolbar and \
+ digitToolbar.GetLayer() == layer_selected):
+ modify.Enable(False)
else:
if action == "modifyAttrb":
modify.Check(True)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-04 06:06:59 UTC (rev 42986)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-04 06:13:01 UTC (rev 42987)
@@ -32,11 +32,11 @@
import gcmd
import globalvar
-from debug import Debug as Debug
+from debug import Debug
from mapdisp_window import MapWindow
-from goutput import wxCmdOutput
-from preferences import globalSettings as UserSettings
-from workspace import Nviz as NvizDefault
+from goutput import wxCmdOutput
+from preferences import globalSettings as UserSettings
+from workspace import Nviz as NvizDefault
import wxnviz
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-08-04 06:06:59 UTC (rev 42986)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-08-04 06:13:01 UTC (rev 42987)
@@ -85,6 +85,8 @@
self.Update()
wx.CallAfter(self.SetPage, 'view')
+ wx.CallAfter(self.notebookData.SetSelection, 0)
+ wx.CallAfter(self.notebookAppearance.SetSelection, 0)
def OnPageChanged(self, event):
new = event.GetSelection()
More information about the grass-commit
mailing list