[GRASS-SVN] r48764 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 12 10:57:57 EDT 2011


Author: annakrat
Date: 2011-10-12 07:57:57 -0700 (Wed, 12 Oct 2011)
New Revision: 48764

Modified:
   grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
   grass/trunk/gui/wxpython/gui_modules/preferences.py
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
   grass/trunk/gui/wxpython/wxgui.py
   grass/trunk/gui/wxpython/wxpythonlib.dox
Log:
wxGUI: remove unused code of old georectifier (co-author V. Petras)

Modified: grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/gui_modules/gcpmapdisp.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -97,7 +97,6 @@
         #
         self.toolbars = { 'map' : None,
                           'vdigit' : None,
-                          'georect' : None, 
                           'gcpdisp' : None, 
                           'gcpman' : None, 
                           'nviz' : None }
@@ -245,7 +244,6 @@
          - 'vdigit'  - vector digitizer
          - 'gcpdisp' - GCP Manager, Display
          - 'gcpman'  - GCP Manager, points management
-         - 'georect' - georectifier
          - 'nviz'    - 3D view mode
         """
         # default toolbar

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -312,7 +312,6 @@
         #
         self.toolbars = { 'map' : None,
                           'vdigit' : None,
-                          'georect' : None,
                           'gcpdisp' : None,
                           'gcpman' : None,
                           'nviz' : None }
@@ -586,7 +585,6 @@
          - 'map'     - basic map toolbar
          - 'vdigit'  - vector digitizer
          - 'gcpdisp' - GCP Manager Display
-         - 'georect' - georectifier
         """
         # default toolbar
         if name == "map":
@@ -605,19 +603,6 @@
         elif name == "vdigit":
             self._addToolbarVDigit()
         
-        # georectifier
-        elif name == "georect":
-            self.toolbars['georect'] = toolbars.GRToolbar(self, self.Map)
-            
-            self._mgr.AddPane(self.toolbars['georect'],
-                              wx.aui.AuiPaneInfo().
-                              Name("georecttoolbar").Caption(_("Georectification Toolbar")).
-                              ToolbarPane().Top().
-                              LeftDockable(False).RightDockable(False).
-                              BottomDockable(False).TopDockable(True).
-                              CloseButton(False).Layer(2).
-                              BestSize((self.toolbars['georect'].GetBestSize())))
-        
         self._mgr.Update()
         
     def RemoveToolbar (self, name):
@@ -658,20 +643,13 @@
         
     def OnFocus(self, event):
         """!Change choicebook page to match display.
-        Or set display for georectifying
         """
-        if self._layerManager and \
-                self._layerManager.georectifying:
-            # in georectifying session; display used to get geographic
-            # coordinates for GCPs
-            self.OnPointer(event)
-        else:
-            # change bookcontrol page to page associated with display
-            if self.page:
-                pgnum = self.layerbook.GetPageIndex(self.page)
-                if pgnum > -1:
-                    self.layerbook.SetSelection(pgnum)
-                    self._layerManager.curr_page = self.layerbook.GetCurrentPage()
+        # change bookcontrol page to page associated with display
+        if self.page:
+            pgnum = self.layerbook.GetPageIndex(self.page)
+            if pgnum > -1:
+                self.layerbook.SetSelection(pgnum)
+                self._layerManager.curr_page = self.layerbook.GetCurrentPage()
         
         event.Skip()
         
@@ -733,9 +711,6 @@
             else: # moveLine, deleteLine
                 self.MapWindow.mouse['box'] = 'box'
         
-        elif self._layerManager and self._layerManager.georectifying:
-            self.MapWindow.SetCursor(self.cursors["cross"])
-        
         else:
             self.MapWindow.SetCursor(self.cursors["default"])
 

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -821,15 +821,6 @@
         #
         if len(self.polycoords) > 0:
             self.DrawLines(self.pdcTmp)
-        
-        if not self.parent.IsStandalone() and \
-                self.parent.GetLayerManager().georectifying:
-            # -> georectifier (redraw GCPs)
-            if self.parent.toolbars['georect']:
-                coordtype = 'gcpcoord'
-            else:
-                coordtype = 'mapcoord'
-            self.parent.GetLayerManager().georectifying.DrawGCP(coordtype)
             
         if not self.parent.IsStandalone() and \
                 self.parent.GetLayerManager().gcpmanagement:
@@ -1336,20 +1327,7 @@
                 
                 self.parent.GetLayerManager().gcpmanagement.SetGCPData(coordtype, coord, self, confirm = True)
                 self.UpdateMap(render = False, renderVector = False)
-        
-        elif self.mouse["use"] == "pointer" and \
-                not self.parent.IsStandalone() and \
-                self.parent.GetLayerManager().georectifying:
-            # -> georectifying
-            coord = self.Pixel2Cell(self.mouse['end'])
-            if self.parent.toolbars['georect']:
-                coordtype = 'gcpcoord'
-            else:
-                coordtype = 'mapcoord'
             
-            self.parent.GetLayerManager().georectifying.SetGCPData(coordtype, coord, self)
-            self.UpdateMap(render = False, renderVector = False)
-            
         elif self.mouse["use"] == "pointer" and \
                 hasattr(self, "digit"):
             self._onLeftUp(event)
@@ -1660,13 +1638,7 @@
         
         # disable tool if stack is empty
         if len(self.zoomhistory) < 2: # disable tool
-            if self.parent.GetName() == 'MapWindow':
-                toolbar = self.parent.toolbars['map']
-            elif self.parent.GetName() == 'GRMapWindow':
-                toolbar = self.parent.toolbars['georect']
-            elif self.parent.GetName() == 'GCPMapWindow':
-                toolbar = self.parent.toolbars['gcpdisp']
-            
+            toolbar = self.parent.GetMapToolbar()
             toolbar.Enable('zoomback', enable = False)
         
         # zoom to selected region

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -521,12 +521,6 @@
                     'width' : 2,
                     },
                 },
-            'georect' : {
-                'symbol' : {
-                    'color' : (0, 0, 255, 255),
-                    'width' : 2,
-                    },
-                },
             'nviz' : {
                 'view' : {
                     'persp' : {

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -438,8 +438,8 @@
         # add tool to toggle active map window
         self.togglemapid = wx.NewId()
         self.togglemap = wx.Choice(parent = self, id = self.togglemapid,
-						    choices = [_('source'), _('target')],
-						    style = wx.CB_READONLY)
+                                   choices = [_('source'), _('target')],
+                                   style = wx.CB_READONLY)
 
         self.InsertControl(10, self.togglemap)
 

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/wxgui.py	2011-10-12 14:57:57 UTC (rev 48764)
@@ -112,7 +112,6 @@
         self.curr_pagenum  = None         # currently selected page number for layer tree notebook
         self.workspaceFile = workspace    # workspace file
         self.workspaceChanged = False     # track changes in workspace
-        self.georectifying = None         # reference to GCP class or None
         self.gcpmanagement = None         # reference to GCP class or None
         
         # list of open dialogs

Modified: grass/trunk/gui/wxpython/wxpythonlib.dox
===================================================================
--- grass/trunk/gui/wxpython/wxpythonlib.dox	2011-10-12 14:31:17 UTC (rev 48763)
+++ grass/trunk/gui/wxpython/wxpythonlib.dox	2011-10-12 14:57:57 UTC (rev 48764)
@@ -160,6 +160,7 @@
  - gui_modules::mapdisp_command::Command
 
 - gui_modules/mapdisp.py
+ - gui_modules::mapdisp::MapFrameBase
  - gui_modules::mapdisp::MapFrame
  - gui_modules::mapdisp::MapApp
 
@@ -178,14 +179,19 @@
  - gui_modules::toolbars::MapToolbar
  - gui_modules::toolbars::GCPManToolbar
  - gui_modules::toolbars::GCPDisplayToolbar
- - gui_modules::toolbars::GRToolbar
- - gui_modules::toolbars::GCPToolbar
  - gui_modules::toolbars::VDigitToolbar
  - gui_modules::toolbars::ProfileToolbar
- - gui_modules::toolbars::NvizToolbar
+ - gui_modules::toolbars::LMNvizToolbar
  - gui_modules::toolbars::ModelToolbar
  - gui_modules::toolbars::HistogramToolbar
- - gui_modules::toolbars::LayerManagerToolbar
+ - gui_modules::toolbars::Histogram2Toolbar
+ - gui_modules::toolbars::ScatterplotToolbar
+ - gui_modules::toolbars::LMWorkspaceToolbar
+ - gui_modules::toolbars::LMDataToolbar
+ - gui_modules::toolbars::LMToolsToolbar
+ - gui_modules::toolbars::LMMiscToolbar
+ - gui_modules::toolbars::LMVectorToolbar
+ - gui_modules::toolbars::PsMapToolbar
 
 \subsection wscreen Welcome screen
 



More information about the grass-commit mailing list