[GRASS-SVN] r55184 - grass/branches/releasebranch_6_4/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 23 09:57:09 PST 2013
Author: annakrat
Date: 2013-02-23 09:57:09 -0800 (Sat, 23 Feb 2013)
New Revision: 55184
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: quick fix for #1606
Modified: grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/frame.py 2013-02-23 11:01:54 UTC (rev 55183)
+++ grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/frame.py 2013-02-23 17:57:09 UTC (rev 55184)
@@ -40,7 +40,7 @@
from mapdisp.gprint import PrintOptions
from core.gcmd import GError, GMessage, RunCommand
from dbmgr.dialogs import DisplayAttributesDialog
-from core.utils import ListOfCatsToRange, GetLayerNameFromCmd
+from core.utils import ListOfCatsToRange, GetLayerNameFromCmd, GetAllVectorLayers
from gui_core.dialogs import GetImageHandlers, ImageSizeDialog, DecorationDialog, TextLayerDialog, \
DECOR_DIALOG_LEGEND, DECOR_DIALOG_BARSCALE
from core.debug import Debug
@@ -674,6 +674,7 @@
isRaster = False
nVectors = 0
isDbConnection = False
+ allLayersConnected = None
for l in layers:
maplayer = self.tree.GetPyData(l)[0]['maplayer']
if maplayer.GetType() == 'raster':
@@ -682,9 +683,18 @@
if maplayer.GetType() == 'vector':
nVectors += 1
isDbConnection = grass.vector_db(maplayer.GetName())
+ if isDbConnection:
+ # check if all layers are connected to db
+ # otherwise show output in command console instead of poping up attribute dialog
+ # which is missing features from layers not connected to db
+ allLayersConnected = True
+ vLayersDb = sorted(isDbConnection.keys())
+ vLayersAll = sorted(map(int, GetAllVectorLayers(maplayer.GetName())))
+ if vLayersAll != vLayersDb:
+ allLayersConnected = False
if not self.IsPaneShown('3d'):
- if isRaster or nVectors > 1 or not isDbConnection:
+ if isRaster or nVectors > 1 or not allLayersConnected:
self.QueryMap(east, north, qdist, layers)
else:
self.QueryVector(east, north, qdist, posWindow, layers[0])
More information about the grass-commit
mailing list