[GRASS-SVN] r49636 - in grass/trunk/gui/wxpython: core lmgr mapdisp modules nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 9 06:17:54 EST 2011


Author: martinl
Date: 2011-12-09 03:17:54 -0800 (Fri, 09 Dec 2011)
New Revision: 49636

Modified:
   grass/trunk/gui/wxpython/core/workspace.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/modules/colorrules.py
   grass/trunk/gui/wxpython/nviz/main.py
Log:
wxGUI: fix loading 3D view mode modules


Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py	2011-12-09 10:33:19 UTC (rev 49635)
+++ grass/trunk/gui/wxpython/core/workspace.py	2011-12-09 11:17:54 UTC (rev 49636)
@@ -22,9 +22,7 @@
 
 from core.utils     import normalize_whitespace
 from core.settings  import UserSettings
-from nviz.main          import haveNviz
-if haveNviz:
-    from nviz.workspace import NvizSettings
+from nviz.main      import NvizSettings
 
 class ProcessWorkspaceFile:
     def __init__(self, tree):
@@ -58,7 +56,7 @@
         
         self.__processFile()
 
-        if haveNviz:
+        if NvizSettings:
             self.nvizDefault = NvizSettings()
         else:
             self.nvizDefault = None

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2011-12-09 10:33:19 UTC (rev 49635)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2011-12-09 11:17:54 UTC (rev 49636)
@@ -270,7 +270,7 @@
         if not haveNviz:
             return
         
-        from nviz.tools import NvizToolWindow
+        from nviz.main import NvizToolWindow
         
         # show toolbar
         self._auimgr.GetPane('toolbarNviz').Show()

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2011-12-09 10:33:19 UTC (rev 49635)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2011-12-09 11:17:54 UTC (rev 49636)
@@ -51,9 +51,7 @@
 from wxplot.histogram   import Histogram2Frame
 from wxplot.profile     import ProfileFrame
 from wxplot.scatter     import ScatterFrame
-from nviz.main          import haveNviz
-if haveNviz:
-    from nviz.mapwindow import GLWindow
+from nviz.main          import haveNviz, GLWindow
 
 from mapdisp import statusbar as sb
 

Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py	2011-12-09 10:33:19 UTC (rev 49635)
+++ grass/trunk/gui/wxpython/modules/colorrules.py	2011-12-09 11:17:54 UTC (rev 49636)
@@ -42,7 +42,6 @@
 from gui_core.forms   import GUI
 from core.debug       import Debug as Debug
 from core.settings    import UserSettings
-from nviz.main        import haveNviz
 
 class RulesPanel:
     def __init__(self, parent, mapType, attributeType, properties, panelWidth = 180):
@@ -1676,6 +1675,7 @@
         
         data['vector'][self.vectorType]['thematic']['update'] = None
         
+        from nviz.main            import haveNviz
         if haveNviz:
             from nviz.mapwindow   import wxUpdateProperties
             

Modified: grass/trunk/gui/wxpython/nviz/main.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/main.py	2011-12-09 10:33:19 UTC (rev 49635)
+++ grass/trunk/gui/wxpython/nviz/main.py	2011-12-09 11:17:54 UTC (rev 49636)
@@ -20,9 +20,10 @@
 errorMsg = ''
 
 try:
-    from wx import glcanvas
-    import nviz.mapwindow
-    import nviz.tools
+    from wx   import glcanvas
+    from nviz import mapwindow
+    from nviz import tools
+    from nviz import workspace
     import wxnviz
     haveNviz = True
 except (ImportError, NameError), err:
@@ -30,8 +31,10 @@
     errorMsg = err
 
 if haveNviz:
-    GLWindow       = nviz.mapwindow.GLWindow
-    NvizToolWindow = nviz.tools.NvizToolWindow
+    GLWindow       = mapwindow.GLWindow
+    NvizToolWindow = tools.NvizToolWindow
+    NvizSettings   = workspace.NvizSettings
 else:
     GLWindow       = None
     NvizToolWindow = None
+    NvizSettings   = None



More information about the grass-commit mailing list