Ver código fonte

wxGUI: errors at querying (trac https://trac.osgeo.org/grass/ticket/212)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31967 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 anos atrás
pai
commit
99818392d7
1 arquivos alterados com 11 adições e 10 exclusões
  1. 11 10
      gui/wxpython/gui_modules/mapdisp.py

+ 11 - 10
gui/wxpython/gui_modules/mapdisp.py

@@ -1181,16 +1181,17 @@ class BufferedWindow(MapWindow, wx.Window):
                             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: