Browse Source

wx.iscatt: zoom to rectangle fix

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58470 15284696-431f-4ddb-bdfa-cd5b030d7da7
Štěpán Turek 11 years ago
parent
commit
c39056ce3f
1 changed files with 10 additions and 0 deletions
  1. 10 0
      gui/wxpython/iscatt/plots.py

+ 10 - 0
gui/wxpython/iscatt/plots.py

@@ -349,6 +349,16 @@ class ScatterPlotWidget(wx.Panel, ManageBusyCursorMixin):
         if x1 == x2 or y1 == y2:
             return
 
+        if x1 > x2:
+            tmp = x1 
+            x1 = x2
+            x2 = tmp
+
+        if y1 > y2:
+            tmp = y1 
+            y1 = y2
+            y2 = tmp
+
         self.axes.axis((x1, x2, y1, y2))
         #self.axes.set_xlim(x1, x2)#, auto = True)
         #self.axes.set_ylim(y1, y2)#, auto = True)