Procházet zdrojové kódy

wxNviz: wx debug messages added

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46661 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová před 14 roky
rodič
revize
90975a8a49

+ 3 - 1
gui/wxpython/gui_modules/mapdisp.py

@@ -356,7 +356,7 @@ class MapFrame(wx.Frame):
         """!Add 3D view mode toolbar
         """
         import nviz
-        
+        Debug.msg(5, "MapFrame._addToolbarNviz(): begin")
         # check for GLCanvas and OpenGL
         if not nviz.haveNviz:
             self.toolbars['map'].combo.SetValue(_("2D view"))
@@ -388,6 +388,7 @@ class MapFrame(wx.Frame):
         
         # create GL window & NVIZ toolbar
         if not self.MapWindow3D:
+            Debug.msg(5, "MapFrame._addToolbarNviz(): GLWindow will be created")
             self.MapWindow3D = nviz.GLWindow(self, id = wx.ID_ANY,
                                              Map = self.Map, tree = self.tree, lmgr = self._layerManager)
             self.MapWindow = self.MapWindow3D
@@ -424,6 +425,7 @@ class MapFrame(wx.Frame):
                           CloseButton(False).Layer(2))
         
         self.SetStatusText("", 0)
+        Debug.msg(5, "MapFrame._addToolbarNviz(): end")
         
     def AddToolbar(self, name):
         """!Add defined toolbar to the window

+ 3 - 2
gui/wxpython/gui_modules/nviz_mapdisp.py

@@ -50,7 +50,7 @@ wxUpdateCPlane,     EVT_UPDATE_CPLANE = NewEvent()
 class NvizThread(Thread):
     def __init__(self, log, progressbar, window):
         Thread.__init__(self)
-        
+        Debug.msg(5, "NvizThread.__init__():")
         self.log = log
         self.progressbar = progressbar
         self.window = window
@@ -71,7 +71,7 @@ class GLWindow(MapWindow, glcanvas.GLCanvas):
     def __init__(self, parent, id = wx.ID_ANY,
                  Map = None, tree = None, lmgr = None):
         self.parent = parent # MapFrame
-        
+        Debug.msg(5, "GLCanvas.__init__(): begin")
         glcanvas.GLCanvas.__init__(self, parent, id)
         MapWindow.__init__(self, parent, id, 
                            Map, tree, lmgr)
@@ -155,6 +155,7 @@ class GLWindow(MapWindow, glcanvas.GLCanvas):
         
         self.Bind(wx.EVT_CLOSE, self.OnClose)
         
+        Debug.msg(5, "GLCanvas.__init__(): end")
         #cplanes cannot be initialized now
         wx.CallAfter(self.InitCPlanes)
         

+ 1 - 0
gui/wxpython/gui_modules/nviz_tools.py

@@ -116,6 +116,7 @@ class NvizToolWindow(FN.FlatNotebook):
     def __init__(self, parent, display, id = wx.ID_ANY,
                  style = globalvar.FNPageStyle|FN.FNB_NO_X_BUTTON|FN.FNB_NO_NAV_BUTTONS,
                  **kwargs):
+        Debug.msg(5, "NvizToolWindow.__init__()")
         self.parent     = parent # GMFrame
         self.mapDisplay = display
         self.mapWindow  = display.GetWindow()

+ 2 - 0
gui/wxpython/wxgui.py

@@ -277,11 +277,13 @@ class GMFrame(wx.Frame):
             
     def AddNviz(self):
         """!Add nviz notebook page"""
+        Debug.msg(5, "GMFrame.AddNviz(): begin")
         self.nviz = nviz_tools.NvizToolWindow(parent = self,
                                               display = self.curr_page.maptree.GetMapDisplay())
         self.notebook.AddPage(page = self.nviz, text = _("3D view"), name = 'nviz')
         self.notebook.SetSelectionByName('nviz')
         self.existNviz = True
+        Debug.msg(5, "GMFrame.AddNviz(): end")
         
     def RemoveNviz(self):
         """!Remove nviz notebook page"""