Skip to content

Commit

Permalink
wxGUI/psmap: fix vector map properties dialog correct typing the name…
Browse files Browse the repository at this point in the history
… of the vector map (OSGeo#3087)

* Use gs.find_file() func instead of pygrass module
  • Loading branch information
tmszi authored and neteler committed Nov 7, 2023
1 parent 80c2f1d commit a35bbc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gui/wxpython/psmap/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1861,11 +1861,13 @@ 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:
if not grass.find_file(
vmap,
element="vector",
)["name"]:
return

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

0 comments on commit a35bbc8

Please sign in to comment.