Sfoglia il codice sorgente

wxGUI/tplot: fix x, y coordinates validation (#1199)

Tomas Zigo 4 anni fa
parent
commit
dfe259a546
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6 2
      gui/wxpython/tplot/frame.py

+ 6 - 2
gui/wxpython/tplot/frame.py

@@ -830,8 +830,12 @@ class TplotFrame(wx.Frame):
                     coordx, coordy = self.coorval.GetValue().split(',')
                     coordx, coordy = float(coordx), float(coordy)
                 except (ValueError, AttributeError):
-                    GMessage(message=_("Incorrect coordinates format, should "
-                                       "be: x,y"), parent=self)
+                    GError(
+                        parent=self,
+                        message=_("Incorrect coordinates format, should be: x,y"),
+                        showTraceback=False,
+                    )
+                    return
             coors = [coordx, coordy]
             if coors:
                 try: