From 8bdfd97dabb71dfb551ff8a67813cbe7c6731ad4 Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:37:41 +0200 Subject: [PATCH] wxGUI/psmap: fix vector map properties dialog correct typing the name of the vector map (#3087) * Use gs.find_file() func instead of pygrass module --- gui/wxpython/psmap/dialogs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/wxpython/psmap/dialogs.py b/gui/wxpython/psmap/dialogs.py index efd91229e1b..75e90d162ab 100644 --- a/gui/wxpython/psmap/dialogs.py +++ b/gui/wxpython/psmap/dialogs.py @@ -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(