[GRASS-SVN] r33251 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 4 10:12:01 EDT 2008
Author: martinl
Date: 2008-09-04 10:12:01 -0400 (Thu, 04 Sep 2008)
New Revision: 33251
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI/vdigit: fix display attributes (update r33249)
close dialog properly
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2008-09-04 13:58:52 UTC (rev 33250)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2008-09-04 14:12:01 UTC (rev 33251)
@@ -193,7 +193,7 @@
"""
if Debug.get_level() == 0:
# don't redirect when debugging is enabled
- # sys.stdout = self.cmd_stdout
+ sys.stdout = self.cmd_stdout
sys.stderr = self.cmd_stderr
return True
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2008-09-04 13:58:52 UTC (rev 33250)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2008-09-04 14:12:01 UTC (rev 33251)
@@ -1199,9 +1199,9 @@
if digitClass.driver.SelectLineByPoint(coords,
digitClass.GetSelectType()) is not None:
self.parent.dialogs['attributes'] = dbm.DisplayAttributesDialog(parent=self, map=map,
- cats=digitClass.GetLineCats(),
- line=digitClass.driver.GetSelected()[0],
- action="update")
+ cats=digitClass.GetLineCats(),
+ line=digitClass.driver.GetSelected()[0],
+ action="update")
else:
# update currently open dialog
@@ -1218,13 +1218,13 @@
line = digitClass.driver.GetSelected()[0]
# upgrade dialog
self.parent.dialogs['attributes'].UpdateDialog(cats=digitClass.GetLineCats(),
- line=line)
+ line=line)
if self.parent.dialogs['attributes']:
line = self.parent.dialogs['attributes'].GetLine()
if self.parent.dialogs['attributes'].mapDBInfo and line:
# highlight feature & re-draw map
- digitClass.driver.SetSelected([line])
+ digitClass.driver.SetSelected(line)
if not self.parent.dialogs['attributes'].IsShown():
self.parent.dialogs['attributes'].Show()
else:
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2008-09-04 13:58:52 UTC (rev 33250)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2008-09-04 14:12:01 UTC (rev 33251)
@@ -592,13 +592,7 @@
# close dialogs if still open
if self.settingsDialog:
self.settingsDialog.OnCancel(None)
-
- if self.parent.dialogs['category']:
- self.parent.dialogs['category'].OnCancel(None)
-
- if self.parent.dialogs['attributes']:
- self.parent.dialogs['attributes'].OnCancel(None)
-
+
# disable the toolbar
self.parent.RemoveToolbar ("vdigit")
@@ -1097,6 +1091,12 @@
# disable pseudodc for vector map layer
self.parent.MapWindow.pdcVector = None
self.parent.digit.driver.SetDevice(None)
+
+ # close dialogs
+ for dialog in ('attributes', 'category'):
+ if self.parent.dialogs[dialog]:
+ self.parent.dialogs[dialog].Close()
+ self.parent.dialogs[dialog] = None
self.parent.digit.__del__() # FIXME: destructor is not called here (del)
self.parent.digit = None
More information about the grass-commit
mailing list