浏览代码

wxGUI: menu item for 3d raster element added (including silk icon)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32474 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 年之前
父节点
当前提交
96fdf04f49
共有 5 个文件被更改,包括 18 次插入5 次删除
  1. 二进制
      gui/icons/silk/bricks.png
  2. 3 4
      gui/wxpython/gui_modules/goutput.py
  3. 3 0
      gui/wxpython/icons/icon.py
  4. 2 1
      gui/wxpython/icons/silk/__init__.py
  5. 10 0
      gui/wxpython/wxgui.py

二进制
gui/icons/silk/bricks.png


+ 3 - 4
gui/wxpython/gui_modules/goutput.py

@@ -193,10 +193,9 @@ class GMConsole(wx.Panel):
         """
         if Debug.get_level() == 0:
             # don't redirect when debugging is enabled
-            #sys.stdout = self.cmd_stdout
-            #sys.stderr = self.cmd_stderr
-            pass
-
+            sys.stdout = self.cmd_stdout
+            sys.stderr = self.cmd_stderr
+            
             return True
 
         return False

+ 3 - 0
gui/wxpython/icons/icon.py

@@ -87,6 +87,7 @@ icons_default = {
     "workspaceOpen" : 'file-open.gif',
     "workspaceSave" : 'file-save.gif',
     "addrast"    : 'element-cell.gif',
+    "addrast3d"    : 'element-grid3.gif',
     "addvect"    : 'element-vector.gif',
     "addcmd"     : 'gui-cmd.gif',
     "addgrp"     : 'gui-group.gif',
@@ -314,6 +315,8 @@ Icons = {
                              label=_("Add labels")),
     "addtext"    : MetaIcon (img=icons_img["addtext"],
                              label=_("Add text layer")),
+    "addrast3d"  : MetaIcon (img=icons_img["addrast3d"],
+                             label=_("Add 3D raster map")),
     # digit
     "digAddPoint": MetaIcon (img=icons_img["digAddPoint"],
                              label=_("Digitize new point"),

+ 2 - 1
gui/wxpython/icons/silk/__init__.py

@@ -57,13 +57,14 @@ IconsSilk = {
     "digUndo" : 'arrow_undo.png',
     "digSettings" : 'color_swatch.png',
     "digAdditionalTools" : 'plugin.png',
-    # gis manager
+    # layer manager
     "newdisplay" : 'application_add.png',
     "workspaceNew" : 'page_white.png',
     "workspaceLoad" : 'page_white_get.png',
     "workspaceOpen" : 'folder.png',
     "workspaceSave" : 'page_save.png',
     "addrast"    : 'image_add.png',
+    "addrast3d"  : 'bricks.png',
     "addshaded"  : 'picture_empty.png',
     "addrarrow"  : 'arrow_inout.png',
     "addvect"    : 'map_add.png',

+ 10 - 0
gui/wxpython/wxgui.py

@@ -1166,6 +1166,12 @@ class GMFrame(wx.Frame):
         rastmenu.AppendItem(addrast)
         self.Bind(wx.EVT_MENU, self.AddRaster, addrast)
 
+        if self.curr_page.maptree.mapdisplay.toolbars['nviz']:
+            addrast3d = wx.MenuItem(rastmenu, -1, Icons ["addrast3d"].GetLabel())
+            addrast3d.SetBitmap(Icons["addrast3d"].GetBitmap (self.iconsize))
+            rastmenu.AppendItem(addrast3d)
+            self.Bind(wx.EVT_MENU, self.AddRaster3d, addrast3d)
+
         addshaded = wx.MenuItem(rastmenu, -1, Icons ["addshaded"].GetLabel())
         addshaded.SetBitmap(Icons["addshaded"].GetBitmap (self.iconsize))
         rastmenu.AppendItem(addshaded)
@@ -1292,6 +1298,10 @@ class GMFrame(wx.Frame):
         self.notebook.SetSelection(0)
         self.curr_page.maptree.AddLayer('rastnum')
 
+    def AddRaster3d(self, event):
+        self.notebook.SetSelection(0)
+        self.curr_page.maptree.AddLayer('raster')
+
     def addVector(self, event):
         """Add vector layer"""
         self.notebook.SetSelection(0)