浏览代码

Perspective is valid 0-pi not 0-100%

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47793 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 13 年之前
父节点
当前提交
891fad1b6f
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 2 2
      gui/wxpython/gui_modules/nviz_mapdisp.py
  2. 2 1
      gui/wxpython/gui_modules/nviz_tools.py

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

@@ -363,8 +363,8 @@ class GLWindow(MapWindow, glcanvas.GLCanvas):
         self.view['persp']['value'] +=  value
         if self.view['persp']['value'] < 1:
             self.view['persp']['value'] = 1
-        elif self.view['persp']['value'] > 100:
-            self.view['persp']['value'] = 100
+        elif self.view['persp']['value'] > 180:
+            self.view['persp']['value'] = 180
         
         if prev_value !=  self.view['persp']['value']:
             if hasattr(self.lmgr, "nviz"):

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

@@ -297,8 +297,9 @@ class NvizToolWindow(FN.FlatNotebook):
                   
         # perspective
         # set initial defaults here (or perhaps in a default values file), not in user settings
+        #todo: consider setting an absolute max at 360 instead of undefined. (leave the default max value at pi)
         self._createControl(panel, data = self.win['view'], name = 'persp',
-                            range = (1,100),
+                            range = (1,180),
                             bind = (self.OnViewChange, self.OnViewChanged, self.OnViewChangedText))
         
         gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _("Perspective:")),