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 (#3087)

* Use gs.find_file() func instead of pygrass module
  • Loading branch information
tmszi committed Sep 18, 2023
1 parent 61e3677 commit 8bdfd97
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 @@ -1866,11 +1866,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 8bdfd97

Please sign in to comment.