[GRASS-SVN] r31967 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 2 09:49:01 EDT 2008


Author: martinl
Date: 2008-07-02 09:49:01 -0400 (Wed, 02 Jul 2008)
New Revision: 31967

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: errors at querying (trac #212)


Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-07-02 13:42:19 UTC (rev 31966)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-07-02 13:49:01 UTC (rev 31967)
@@ -1181,16 +1181,17 @@
                             self.parent.dialogs['attributes'].UpdateDialog(cats=digitClass.GetLineCats(),
                                                                       line=line)
 
-                    line = self.parent.dialogs['attributes'].GetLine()
-                    if self.parent.dialogs['attributes'].mapDBInfo and line:
-                        # highlight feature & re-draw map
-                        digitClass.driver.SetSelected([line])
-                        if not self.parent.dialogs['attributes'].IsShown():
-                            self.parent.dialogs['attributes'].Show()
-                    else:
-                        digitClass.driver.SetSelected([])
-                        if self.parent.dialogs['attributes'].IsShown():
-                            self.parent.dialogs['attributes'].Hide()
+                    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])
+                            if not self.parent.dialogs['attributes'].IsShown():
+                                self.parent.dialogs['attributes'].Show()
+                        else:
+                            digitClass.driver.SetSelected([])
+                            if self.parent.dialogs['attributes'].IsShown():
+                                self.parent.dialogs['attributes'].Hide()
 
                 else: # displayCats
                     if self.parent.dialogs['category'] is None:



More information about the grass-commit mailing list