Przeglądaj źródła

wxGUI: indicate if MASK is available (change mapdisplay title)
minor doxygen updates


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38091 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 lat temu
rodzic
commit
3f16472479

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

@@ -109,7 +109,8 @@ class MapFrame(wx.Frame):
         self.page       = page      # Notebook page holding the layer tree
         self.page       = page      # Notebook page holding the layer tree
         self.layerbook  = notebook  # Layer Manager layer tree notebook
         self.layerbook  = notebook  # Layer Manager layer tree notebook
         self.parent     = parent
         self.parent     = parent
-
+        self.title      = title
+        
         #
         #
         # available cursors
         # available cursors
         #
         #

+ 73 - 67
gui/wxpython/gui_modules/mapdisp_window.py

@@ -1,4 +1,4 @@
-"""
+"""!
 @package mapdisp_window.py
 @package mapdisp_window.py
 
 
 @brief GIS map display canvas, buffered window.
 @brief GIS map display canvas, buffered window.
@@ -25,6 +25,8 @@ import tempfile
 
 
 import wx
 import wx
 
 
+import grass.script as grass
+
 import dbm
 import dbm
 import dbm_dialogs
 import dbm_dialogs
 import gdialogs
 import gdialogs
@@ -42,7 +44,7 @@ from vdigit import VDigitDuplicatesDialog
 from vdigit import PseudoDC
 from vdigit import PseudoDC
 
 
 class MapWindow(object):
 class MapWindow(object):
-    """
+    """!
     Abstract map window class
     Abstract map window class
 
 
     Parent for BufferedWindow class (2D display mode) and
     Parent for BufferedWindow class (2D display mode) and
@@ -67,13 +69,13 @@ class MapWindow(object):
             }
             }
         
         
     def EraseMap(self):
     def EraseMap(self):
-        """
+        """!
         Erase the canvas (virtual method)
         Erase the canvas (virtual method)
         """
         """
         pass
         pass
 
 
     def UpdateMap(self):
     def UpdateMap(self):
-        """
+        """!
         Updates the canvas anytime there is a change to the
         Updates the canvas anytime there is a change to the
         underlaying images or to the geometry of the canvas.
         underlaying images or to the geometry of the canvas.
         """
         """
@@ -95,7 +97,7 @@ class MapWindow(object):
         pass
         pass
     
     
     def GetSelectedLayer(self, type = 'layer', multi = False):
     def GetSelectedLayer(self, type = 'layer', multi = False):
-        """
+        """!
         Get selected layer from layer tree
         Get selected layer from layer tree
 
 
         @param type 'item' / 'layer' / 'nviz'
         @param type 'item' / 'layer' / 'nviz'
@@ -142,7 +144,7 @@ class MapWindow(object):
         return ret
         return ret
     
     
 class BufferedWindow(MapWindow, wx.Window):
 class BufferedWindow(MapWindow, wx.Window):
-    """
+    """!
     A Buffered window class.
     A Buffered window class.
 
 
     When the drawing needs to change, you app needs to call the
     When the drawing needs to change, you app needs to call the
@@ -244,7 +246,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.lastpos  = (0, 0)
         self.lastpos  = (0, 0)
 
 
     def Draw(self, pdc, img=None, drawid=None, pdctype='image', coords=[0, 0, 0, 0]):
     def Draw(self, pdc, img=None, drawid=None, pdctype='image', coords=[0, 0, 0, 0]):
-        """
+        """!
         Draws map and overlay decorations
         Draws map and overlay decorations
         """
         """
         if drawid == None:
         if drawid == None:
@@ -379,7 +381,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return drawid
         return drawid
 
 
     def TextBounds(self, textinfo):
     def TextBounds(self, textinfo):
-        """
+        """!
         Return text boundary data
         Return text boundary data
 
 
         @param textinfo text metadata (text, font, color, rotation)
         @param textinfo text metadata (text, font, color, rotation)
@@ -414,7 +416,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return coords, boxw, boxh
         return coords, boxw, boxh
 
 
     def OnPaint(self, event):
     def OnPaint(self, event):
-        """
+        """!
         Draw PseudoDC's to buffered paint DC
         Draw PseudoDC's to buffered paint DC
 
 
         self.pdc for background and decorations
         self.pdc for background and decorations
@@ -496,7 +498,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.redrawAll = False
             self.redrawAll = False
                 
                 
     def OnSize(self, event):
     def OnSize(self, event):
-        """
+        """!
         Scale map image so that it is
         Scale map image so that it is
         the same size as the Window
         the same size as the Window
         """
         """
@@ -532,7 +534,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.parent.StatusbarUpdate()
         self.parent.StatusbarUpdate()
 
 
     def OnIdle(self, event):
     def OnIdle(self, event):
-        """
+        """!
         Only re-render a composite map image from GRASS during
         Only re-render a composite map image from GRASS during
         idle time instead of multiple times during resizing.
         idle time instead of multiple times during resizing.
         """
         """
@@ -542,7 +544,7 @@ class BufferedWindow(MapWindow, wx.Window):
         event.Skip()
         event.Skip()
 
 
     def SaveToFile(self, FileName, FileType):
     def SaveToFile(self, FileName, FileType):
-        """
+        """!
         This draws the psuedo DC to a buffer that
         This draws the psuedo DC to a buffer that
         can be saved to a file.
         can be saved to a file.
         """
         """
@@ -553,7 +555,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.buffer.SaveFile(FileName, FileType)
         self.buffer.SaveFile(FileName, FileType)
 
 
     def GetOverlay(self):
     def GetOverlay(self):
-        """
+        """!
         Converts rendered overlay files to wx.Image
         Converts rendered overlay files to wx.Image
 
 
         Updates self.imagedict
         Updates self.imagedict
@@ -571,7 +573,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return imgs
         return imgs
 
 
     def GetImage(self):
     def GetImage(self):
-        """
+        """!
         Converts redered map files to wx.Image
         Converts redered map files to wx.Image
 
 
         Updates self.imagedict (id=99)
         Updates self.imagedict (id=99)
@@ -590,7 +592,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return img
         return img
 
 
     def UpdateMap(self, render=True, renderVector=True):
     def UpdateMap(self, render=True, renderVector=True):
-        """
+        """!
         Updates the canvas anytime there is a change to the
         Updates the canvas anytime there is a change to the
         underlaying images or to the geometry of the canvas.
         underlaying images or to the geometry of the canvas.
 
 
@@ -622,7 +624,7 @@ class BufferedWindow(MapWindow, wx.Window):
         # update layer dictionary if there has been a change in layers
         # update layer dictionary if there has been a change in layers
         if self.tree and self.tree.reorder == True:
         if self.tree and self.tree.reorder == True:
             self.tree.ReorderLayers()
             self.tree.ReorderLayers()
-            
+        
         # reset flag for auto-rendering
         # reset flag for auto-rendering
         if self.tree:
         if self.tree:
             self.tree.rerender = False
             self.tree.rerender = False
@@ -663,7 +665,7 @@ class BufferedWindow(MapWindow, wx.Window):
                 return False
                 return False
 
 
             self.Draw(self.pdc, self.img, drawid=id)
             self.Draw(self.pdc, self.img, drawid=id)
-
+        
         #
         #
         # render vector map layer
         # render vector map layer
         #
         #
@@ -709,10 +711,10 @@ class BufferedWindow(MapWindow, wx.Window):
         for id in self.textdict.keys():
         for id in self.textdict.keys():
             self.Draw(self.pdc, img=self.textdict[id], drawid=id,
             self.Draw(self.pdc, img=self.textdict[id], drawid=id,
                       pdctype='text', coords=[10, 10, 10, 10])
                       pdctype='text', coords=[10, 10, 10, 10])
-
+        
         # optionally draw computational extent box
         # optionally draw computational extent box
         self.DrawCompRegionExtent()
         self.DrawCompRegionExtent()
-
+        
         #
         #
         # redraw pdcTmp if needed
         # redraw pdcTmp if needed
         #
         #
@@ -731,7 +733,6 @@ class BufferedWindow(MapWindow, wx.Window):
         # 
         # 
         # clear measurement
         # clear measurement
         #
         #
-        
         if self.mouse["use"] == "measure":
         if self.mouse["use"] == "measure":
             self.ClearLines(pdc=self.pdcTmp)
             self.ClearLines(pdc=self.pdcTmp)
             self.polycoords = []
             self.polycoords = []
@@ -741,25 +742,30 @@ class BufferedWindow(MapWindow, wx.Window):
             self.SetCursor(self.parent.cursors["default"])
             self.SetCursor(self.parent.cursors["default"])
             
             
         stop = time.clock()
         stop = time.clock()
-
+        
         #
         #
         # hide process bar
         # hide process bar
         #
         #
         self.parent.onRenderGauge.Hide()
         self.parent.onRenderGauge.Hide()
 
 
         #
         #
-        # update statusbar
+        # update statusbar 
         #
         #
         ### self.Map.SetRegion()
         ### self.Map.SetRegion()
         self.parent.StatusbarUpdate()
         self.parent.StatusbarUpdate()
-
+        if grass.find_file(name = 'MASK', element = 'cell')['name']:
+            # mask found
+            self.parent.SetTitle(self.parent.title + _(' (masked)'))
+        else:
+            self.parent.SetTitle(self.parent.title)
+        
         Debug.msg (2, "BufferedWindow.UpdateMap(): render=%s, renderVector=%s -> time=%g" % \
         Debug.msg (2, "BufferedWindow.UpdateMap(): render=%s, renderVector=%s -> time=%g" % \
                    (render, renderVector, (stop-start)))
                    (render, renderVector, (stop-start)))
         
         
         return True
         return True
 
 
     def DrawCompRegionExtent(self):
     def DrawCompRegionExtent(self):
-        """
+        """!
         Draw computational region extent in the display
         Draw computational region extent in the display
         
         
         Display region is drawn as a blue box inside the computational region,
         Display region is drawn as a blue box inside the computational region,
@@ -787,7 +793,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.DrawLines(pdc=self.pdcDec, polycoords=self.regionCoords)
             self.DrawLines(pdc=self.pdcDec, polycoords=self.regionCoords)
 
 
     def IsInRegion(self, region, refRegion):
     def IsInRegion(self, region, refRegion):
-        """
+        """!
         Test if 'region' is inside of 'refRegion'
         Test if 'region' is inside of 'refRegion'
 
 
         @param region input region
         @param region input region
@@ -805,7 +811,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return False
         return False
 
 
     def EraseMap(self):
     def EraseMap(self):
-        """
+        """!
         Erase the canvas
         Erase the canvas
         """
         """
         self.Draw(self.pdc, pdctype='clear')
         self.Draw(self.pdc, pdctype='clear')
@@ -817,7 +823,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.Draw(self.pdcTmp, pdctype='clear')
         self.Draw(self.pdcTmp, pdctype='clear')
         
         
     def DragMap(self, moveto):
     def DragMap(self, moveto):
-        """
+        """!
         Drag the entire map image for panning.
         Drag the entire map image for panning.
         """
         """
 
 
@@ -836,7 +842,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return True
         return True
 
 
     def DragItem(self, id, event):
     def DragItem(self, id, event):
-        """
+        """!
         Drag an overlay decoration item
         Drag an overlay decoration item
         """
         """
         if id == 99 or id == '' or id == None: return
         if id == 99 or id == '' or id == None: return
@@ -867,7 +873,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.lastpos = (event.GetX(), event.GetY())
         self.lastpos = (event.GetX(), event.GetY())
                 
                 
     def MouseDraw(self, pdc=None, begin=None, end=None):
     def MouseDraw(self, pdc=None, begin=None, end=None):
-        """
+        """!
         Mouse box or line from 'begin' to 'end'
         Mouse box or line from 'begin' to 'end'
 
 
         If not given from self.mouse['begin'] to self.mouse['end'].
         If not given from self.mouse['begin'] to self.mouse['end'].
@@ -918,7 +924,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.Draw(pdc, drawid=self.lineid, pdctype='line', coords=mousecoords)
             self.Draw(pdc, drawid=self.lineid, pdctype='line', coords=mousecoords)
 
 
     def DrawLines(self, pdc=None, polycoords=None):
     def DrawLines(self, pdc=None, polycoords=None):
-        """
+        """!
         Draw polyline in PseudoDC
         Draw polyline in PseudoDC
 
 
         Set self.pline to wx.NEW_ID + 1
         Set self.pline to wx.NEW_ID + 1
@@ -989,7 +995,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return self.lineid
         return self.lineid
 
 
     def MouseActions(self, event):
     def MouseActions(self, event):
-        """
+        """!
         Mouse motion and button click notifier
         Mouse motion and button click notifier
         """
         """
         if not self.processMouse:
         if not self.processMouse:
@@ -1036,7 +1042,7 @@ class BufferedWindow(MapWindow, wx.Window):
 #        event.Skip()
 #        event.Skip()
         
         
     def OnMouseWheel(self, event):
     def OnMouseWheel(self, event):
-        """
+        """!
         Mouse wheel moved
         Mouse wheel moved
         """
         """
         self.processMouse = False
         self.processMouse = False
@@ -1070,7 +1076,7 @@ class BufferedWindow(MapWindow, wx.Window):
 #        event.Skip()
 #        event.Skip()
 
 
     def OnDragging(self, event):
     def OnDragging(self, event):
-        """
+        """!
         Mouse dragging with left button down
         Mouse dragging with left button down
         """
         """
         Debug.msg (5, "BufferedWindow.MouseAction(): Dragging")
         Debug.msg (5, "BufferedWindow.MouseAction(): Dragging")
@@ -1107,7 +1113,7 @@ class BufferedWindow(MapWindow, wx.Window):
 #        event.Skip()
 #        event.Skip()
 
 
     def OnLeftDownVDigitAddLine(self, event):
     def OnLeftDownVDigitAddLine(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer add new line
         Left mouse button down - vector digitizer add new line
         action
         action
         """
         """
@@ -1262,7 +1268,7 @@ class BufferedWindow(MapWindow, wx.Window):
                 atm.LoadData(layer)
                 atm.LoadData(layer)
         
         
     def OnLeftDownVDigitEditLine(self, event):
     def OnLeftDownVDigitEditLine(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer edit linear feature
         Left mouse button down - vector digitizer edit linear feature
         - add new vertex.
         - add new vertex.
         """
         """
@@ -1274,7 +1280,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.DrawLines(pdc=self.pdcTmp)
         self.DrawLines(pdc=self.pdcTmp)
 
 
     def OnLeftDownVDigitMoveLine(self, event):
     def OnLeftDownVDigitMoveLine(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer move feature/vertex,
         Left mouse button down - vector digitizer move feature/vertex,
         edit linear feature
         edit linear feature
         """
         """
@@ -1298,7 +1304,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.pdcTmp.SetPen(self.polypen)
             self.pdcTmp.SetPen(self.polypen)
 
 
     def OnLeftDownVDigitDisplayCA(self, event):
     def OnLeftDownVDigitDisplayCA(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer display categories
         Left mouse button down - vector digitizer display categories
         or attributes action
         or attributes action
         """
         """
@@ -1379,7 +1385,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.UpdateMap(render=False)
         self.UpdateMap(render=False)
  
  
     def OnLeftDownVDigitCopyCA(self, event):
     def OnLeftDownVDigitCopyCA(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer copy categories
         Left mouse button down - vector digitizer copy categories
         or attributes action
         or attributes action
         """
         """
@@ -1393,7 +1399,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.mouse['box'] = 'box'
             self.mouse['box'] = 'box'
         
         
     def OnLeftDownVDigitCopyLine(self, event):
     def OnLeftDownVDigitCopyLine(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer copy lines action
         Left mouse button down - vector digitizer copy lines action
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -1404,7 +1410,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.layerTmp = None
             self.layerTmp = None
         
         
     def OnLeftDownVDigitBulkLine(self, event):
     def OnLeftDownVDigitBulkLine(self, event):
-        """
+        """!
         Left mouse button down - vector digitizer label 3d vector
         Left mouse button down - vector digitizer label 3d vector
         lines
         lines
         """
         """
@@ -1425,7 +1431,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.DrawLines(self.pdcTmp, begin, end)
             self.DrawLines(self.pdcTmp, begin, end)
         
         
     def OnLeftDown(self, event):
     def OnLeftDown(self, event):
-        """
+        """!
         Left mouse button pressed
         Left mouse button pressed
         """
         """
         Debug.msg (5, "BufferedWindow.OnLeftDown(): use=%s" % \
         Debug.msg (5, "BufferedWindow.OnLeftDown(): use=%s" % \
@@ -1520,7 +1526,7 @@ class BufferedWindow(MapWindow, wx.Window):
         event.Skip()
         event.Skip()
 
 
     def OnLeftUpVDigitVarious(self, event):
     def OnLeftUpVDigitVarious(self, event):
-        """
+        """!
         Left mouse button up - vector digitizer various actions
         Left mouse button up - vector digitizer various actions
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -1654,7 +1660,7 @@ class BufferedWindow(MapWindow, wx.Window):
                 self.UpdateMap(render=False, renderVector=False)
                 self.UpdateMap(render=False, renderVector=False)
         
         
     def OnLeftUpVDigitModifyLine(self, event):
     def OnLeftUpVDigitModifyLine(self, event):
-        """
+        """!
         Left mouse button up - vector digitizer split line, add/remove
         Left mouse button up - vector digitizer split line, add/remove
         vertex action
         vertex action
         """
         """
@@ -1692,7 +1698,7 @@ class BufferedWindow(MapWindow, wx.Window):
                 self.UpdateMap(render=False)
                 self.UpdateMap(render=False)
 
 
     def OnLeftUpVDigitCopyLine(self, event):
     def OnLeftUpVDigitCopyLine(self, event):
-        """
+        """!
         Left mouse button up - vector digitizer copy feature action
         Left mouse button up - vector digitizer copy feature action
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -1745,7 +1751,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.redrawAll = None
             self.redrawAll = None
             
             
     def OnLeftUpVDigitBulkLine(self, event):
     def OnLeftUpVDigitBulkLine(self, event):
-        """
+        """!
         Left mouse button up - vector digitizer z-bulk line action
         Left mouse button up - vector digitizer z-bulk line action
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -1765,7 +1771,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.UpdateMap(render=False, renderVector=False)
             self.UpdateMap(render=False, renderVector=False)
 
 
     def OnLeftUpVDigitConnectLine(self, event):
     def OnLeftUpVDigitConnectLine(self, event):
-        """
+        """!
         Left mouse button up - vector digitizer connect line action
         Left mouse button up - vector digitizer connect line action
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -1775,7 +1781,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.UpdateMap(render=False)
             self.UpdateMap(render=False)
         
         
     def OnLeftUp(self, event):
     def OnLeftUp(self, event):
-        """
+        """!
         Left mouse button released
         Left mouse button released
         """
         """
         Debug.msg (5, "BufferedWindow.OnLeftUp(): use=%s" % \
         Debug.msg (5, "BufferedWindow.OnLeftUp(): use=%s" % \
@@ -1896,7 +1902,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.currtxtid = None
             self.currtxtid = None
         
         
     def OnButtonDClick(self, event):
     def OnButtonDClick(self, event):
-        """
+        """!
         Mouse button double click
         Mouse button double click
         """
         """
         Debug.msg (5, "BufferedWindow.OnButtonDClick(): use=%s" % \
         Debug.msg (5, "BufferedWindow.OnButtonDClick(): use=%s" % \
@@ -1938,7 +1944,7 @@ class BufferedWindow(MapWindow, wx.Window):
                 self.parent.OnAddLegend(None)
                 self.parent.OnAddLegend(None)
         
         
     def OnRightDown(self, event):
     def OnRightDown(self, event):
-        """
+        """!
         Right mouse button pressed
         Right mouse button pressed
         """
         """
         Debug.msg (5, "BufferedWindow.OnRightDown(): use=%s" % \
         Debug.msg (5, "BufferedWindow.OnRightDown(): use=%s" % \
@@ -1975,7 +1981,7 @@ class BufferedWindow(MapWindow, wx.Window):
         event.Skip()
         event.Skip()
 
 
     def OnRightUp(self, event):
     def OnRightUp(self, event):
-        """
+        """!
         Right mouse button released
         Right mouse button released
         """
         """
         Debug.msg (5, "BufferedWindow.OnRightUp(): use=%s" % \
         Debug.msg (5, "BufferedWindow.OnRightUp(): use=%s" % \
@@ -2159,7 +2165,7 @@ class BufferedWindow(MapWindow, wx.Window):
         event.Skip()
         event.Skip()
 
 
     def OnMiddleDown(self, event):
     def OnMiddleDown(self, event):
-        """
+        """!
         Middle mouse button pressed
         Middle mouse button pressed
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -2224,7 +2230,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.redrawAll = True
             self.redrawAll = True
             
             
     def OnMouseMoving(self, event):
     def OnMouseMoving(self, event):
-        """
+        """!
         Motion event and no mouse buttons were pressed
         Motion event and no mouse buttons were pressed
         """
         """
         digitToolbar = self.parent.toolbars['vdigit']
         digitToolbar = self.parent.toolbars['vdigit']
@@ -2291,7 +2297,7 @@ class BufferedWindow(MapWindow, wx.Window):
         event.Skip()
         event.Skip()
 
 
     def ClearLines(self, pdc=None):
     def ClearLines(self, pdc=None):
-        """
+        """!
         Clears temporary drawn lines from PseudoDC
         Clears temporary drawn lines from PseudoDC
         """
         """
         if not pdc:
         if not pdc:
@@ -2316,7 +2322,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return True
         return True
 
 
     def Pixel2Cell(self, (x, y)):
     def Pixel2Cell(self, (x, y)):
-        """
+        """!
         Convert image coordinates to real word coordinates
         Convert image coordinates to real word coordinates
 
 
         Input : int x, int y
         Input : int x, int y
@@ -2347,7 +2353,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return (east, north)
         return (east, north)
 
 
     def Cell2Pixel(self, (east, north)):
     def Cell2Pixel(self, (east, north)):
-        """
+        """!
         Convert real word coordinates to image coordinates
         Convert real word coordinates to image coordinates
         """
         """
 
 
@@ -2374,7 +2380,7 @@ class BufferedWindow(MapWindow, wx.Window):
         return (x, y)
         return (x, y)
 
 
     def Zoom(self, begin, end, zoomtype):
     def Zoom(self, begin, end, zoomtype):
-        """
+        """!
         Calculates new region while (un)zoom/pan-ing
         Calculates new region while (un)zoom/pan-ing
         """
         """
         x1, y1 = begin
         x1, y1 = begin
@@ -2450,7 +2456,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.redrawAll = True
             self.redrawAll = True
 
 
     def ZoomBack(self):
     def ZoomBack(self):
-        """
+        """!
         Zoom to previous extents in zoomhistory list
         Zoom to previous extents in zoomhistory list
         """
         """
 
 
@@ -2476,7 +2482,7 @@ class BufferedWindow(MapWindow, wx.Window):
             self.parent.StatusbarUpdate()
             self.parent.StatusbarUpdate()
 
 
     def ZoomHistory(self, n, s, e, w):
     def ZoomHistory(self, n, s, e, w):
-        """
+        """!
         Manages a list of last 10 zoom extents
         Manages a list of last 10 zoom extents
 
 
         Return removed history item if exists
         Return removed history item if exists
@@ -2497,20 +2503,20 @@ class BufferedWindow(MapWindow, wx.Window):
         return removed
         return removed
 
 
     def OnZoomToMap(self, event):
     def OnZoomToMap(self, event):
-        """
+        """!
         Set display extents to match selected raster (including NULLs)
         Set display extents to match selected raster (including NULLs)
         or vector map.
         or vector map.
         """
         """
         self.ZoomToMap()
         self.ZoomToMap()
 
 
     def OnZoomToRaster(self, event):
     def OnZoomToRaster(self, event):
-        """
+        """!
         Set display extents to match selected raster map (ignore NULLs)
         Set display extents to match selected raster map (ignore NULLs)
         """
         """
         self.ZoomToMap(ignoreNulls = True)
         self.ZoomToMap(ignoreNulls = True)
         
         
     def ZoomToMap(self, layers = None, ignoreNulls = False, render = True):
     def ZoomToMap(self, layers = None, ignoreNulls = False, render = True):
-        """
+        """!
         Set display extents to match selected raster
         Set display extents to match selected raster
         or vector map(s).
         or vector map(s).
 
 
@@ -2557,7 +2563,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.parent.StatusbarUpdate()
         self.parent.StatusbarUpdate()
         
         
     def ZoomToWind(self, event):
     def ZoomToWind(self, event):
-        """
+        """!
         Set display geometry to match computational
         Set display geometry to match computational
         region settings (set with g.region)
         region settings (set with g.region)
         """
         """
@@ -2572,7 +2578,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.parent.StatusbarUpdate()
         self.parent.StatusbarUpdate()
 
 
     def ZoomToDefault(self, event):
     def ZoomToDefault(self, event):
-        """
+        """!
         Set display geometry to match default region settings
         Set display geometry to match default region settings
         """
         """
         self.Map.region = self.Map.GetRegion(default=True)
         self.Map.region = self.Map.GetRegion(default=True)
@@ -2586,7 +2592,7 @@ class BufferedWindow(MapWindow, wx.Window):
         self.parent.StatusbarUpdate()
         self.parent.StatusbarUpdate()
         
         
     def DisplayToWind(self, event):
     def DisplayToWind(self, event):
-        """
+        """!
         Set computational region (WIND file) to
         Set computational region (WIND file) to
         match display extents
         match display extents
         """
         """
@@ -2611,7 +2617,7 @@ class BufferedWindow(MapWindow, wx.Window):
             os.environ["GRASS_REGION"] = tmpreg
             os.environ["GRASS_REGION"] = tmpreg
 
 
     def ZoomToSaved(self, event):
     def ZoomToSaved(self, event):
-        """
+        """!
         Set display geometry to match extents in
         Set display geometry to match extents in
         saved region file
         saved region file
         """
         """
@@ -2658,7 +2664,7 @@ class BufferedWindow(MapWindow, wx.Window):
         dlg.Destroy()
         dlg.Destroy()
         
         
     def SaveDisplayRegion(self, event):
     def SaveDisplayRegion(self, event):
-        """
+        """!
         Save display extents to named region file.
         Save display extents to named region file.
         """
         """
 
 
@@ -2690,7 +2696,7 @@ class BufferedWindow(MapWindow, wx.Window):
         dlg.Destroy()
         dlg.Destroy()
 
 
     def SaveRegion(self, wind):
     def SaveRegion(self, wind):
-        """
+        """!
         Save region settings
         Save region settings
         """
         """
         new = self.Map.AlignResolution()
         new = self.Map.AlignResolution()

+ 4 - 4
gui/wxpython/gui_modules/wxgui_utils.py

@@ -108,10 +108,10 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                                            Map=self.Map, auimgr=self.auimgr)
                                            Map=self.Map, auimgr=self.auimgr)
 
 
         # title
         # title
-        self.mapdisplay.SetTitle(_("GRASS GIS Map Display: " +
-                                   str(self.disp_idx + 1) + 
-                                   " - Location: " + grass.gisenv()["LOCATION_NAME"]))
-
+        self.mapdisplay.title = _("GRASS GIS Map Display: %d  - Location: %s") % \
+            (self.disp_idx + 1, grass.gisenv()["LOCATION_NAME"])
+        self.mapdisplay.SetTitle(self.mapdisplay.title)
+        
         # show new display
         # show new display
         if kargs['showMapDisplay'] is True:
         if kargs['showMapDisplay'] is True:
             self.mapdisplay.Show()
             self.mapdisplay.Show()