Browse Source

wxGUI/nviz: fix setting background color

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42671 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 years ago
parent
commit
6fda40062c
1 changed files with 2 additions and 6 deletions
  1. 2 6
      gui/wxpython/gui_modules/wxnviz.py

+ 2 - 6
gui/wxpython/gui_modules/wxnviz.py

@@ -157,15 +157,11 @@ class Nviz(object):
         # define default attributes for map objects
         # define default attributes for map objects
         Nviz_set_surface_attr_default()
         Nviz_set_surface_attr_default()
         # set background color
         # set background color
-        Nviz_set_bgcolor(self.data, Nviz_color_from_str("white")) # TODO
-        self.SetBgColor("white")
+        Nviz_set_bgcolor(self.data, Nviz_color_from_str("white"))
         
         
         # initialize view, lights
         # initialize view, lights
         Nviz_init_view(self.data)
         Nviz_init_view(self.data)
         
         
-        # clear window
-        GS_clear(self.data.bgcolor)
-        
         Debug.msg(1, "Nviz::InitView()")
         Debug.msg(1, "Nviz::InitView()")
         
         
     def SetBgColor(self, color_str):
     def SetBgColor(self, color_str):
@@ -173,7 +169,7 @@ class Nviz(object):
         
         
         @param color_str color string
         @param color_str color string
         """
         """
-        self.data.bgcolor = Nviz_color_from_str(color_str)
+        Nviz_set_bgcolor(self.data, Nviz_color_from_str(color_str))
         
         
     def SetLight(self, x, y, z, color, bright, ambient, w = 0, lid = 1):
     def SetLight(self, x, y, z, color, bright, ambient, w = 0, lid = 1):
         """!Change lighting settings
         """!Change lighting settings