Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/psmap: fix vector map properties dialog correct typing the name of the vector map #3087

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions gui/wxpython/psmap/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from wx import PyValidator as Validator

import grass.script as grass
from grass.pygrass.utils import findmaps
tmszi marked this conversation as resolved.
Show resolved Hide resolved

from core.utils import PilImageToWxImage
from dbmgr.vinfo import VectorDBInfo
Expand Down Expand Up @@ -1861,11 +1862,17 @@ def _layout(self):
def OnVector(self, event):
"""Gets info about toplogy and enables/disables choices point/line/area"""
vmap = self.select.GetValue()
try:
topoInfo = grass.vector_info_topo(map=vmap)
except grass.ScriptError:
genv = grass.core.gisenv()
if not findmaps(
type="vector",
pattern=vmap,
mapset=genv["MAPSET"],
location=genv["LOCATION_NAME"],
gisdbase=genv["GISDBASE"],
):
return

topoInfo = grass.vector_info_topo(map=vmap)
if topoInfo:
self.vectorType.EnableItem(2, bool(topoInfo["areas"]))
self.vectorType.EnableItem(
Expand Down