瀏覽代碼

wxGUI: solve https://trac.osgeo.org/grass/ticket/2558 and https://trac.osgeo.org/grass/ticket/3112 by distributing wx.lib.plot.py with GRASS (merge from trunk, https://trac.osgeo.org/grass/changeset/69075)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@69077 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 年之前
父節點
當前提交
483a1248a5

File diff suppressed because it is too large
+ 2556 - 0
gui/wxpython/gui_core/wxlibplot.py


+ 8 - 1
gui/wxpython/iclass/plots.py

@@ -16,7 +16,14 @@ for details.
 """
 
 import wx
-import wx.lib.plot as plot
+from core.globalvar import CheckWxVersion
+try:
+    if CheckWxVersion(version=[3, 0, 0]):
+        import gui_core.wxlibplot as plot
+    else:
+        import wx.lib.plot as plot
+except ImportError as e:
+    print >> sys.stderr, e
 import wx.lib.scrolledpanel as scrolled
 from core.utils import _
 from core.gcmd import GError

+ 5 - 1
gui/wxpython/wxplot/base.py

@@ -19,8 +19,12 @@ import os
 import sys
 
 import wx
+from core.globalvar import CheckWxVersion
 try:
-    import wx.lib.plot as plot
+    if CheckWxVersion(version=[3, 0, 0]):
+        import gui_core.wxlibplot as plot
+    else:
+        import wx.lib.plot as plot
 except ImportError as e:
     print >> sys.stderr, e
 

+ 5 - 1
gui/wxpython/wxplot/histogram.py

@@ -18,8 +18,12 @@ This program is free software under the GNU General Public License
 import sys
 
 import wx
+from core.globalvar import CheckWxVersion
 try:
-    import wx.lib.plot as plot
+    if CheckWxVersion(version=[3, 0, 0]):
+        import gui_core.wxlibplot as plot
+    else:
+        import wx.lib.plot as plot
 except ImportError as e:
     print >> sys.stderr, e
 

+ 5 - 1
gui/wxpython/wxplot/profile.py

@@ -20,8 +20,12 @@ import sys
 import math
 
 import wx
+from core.globalvar import CheckWxVersion
 try:
-    import wx.lib.plot as plot
+    if CheckWxVersion(version=[3, 0, 0]):
+        import gui_core.wxlibplot as plot
+    else:
+        import wx.lib.plot as plot
 except ImportError as e:
     print >> sys.stderr, e
 

+ 5 - 1
gui/wxpython/wxplot/scatter.py

@@ -18,8 +18,12 @@ This program is free software under the GNU General Public License
 import sys
 
 import wx
+from core.globalvar import CheckWxVersion
 try:
-    import wx.lib.plot as plot
+    if CheckWxVersion(version=[3, 0, 0]):
+        import gui_core.wxlibplot as plot
+    else:
+        import wx.lib.plot as plot
 except ImportError as e:
     print >> sys.stderr, e