/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/view.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/view.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 551 by jonathan, Thu Mar 20 09:45:33 2003 UTC revision 789 by bh, Wed Apr 30 11:06:00 2003 UTC
# Line 24  from wxproj import point_in_polygon_shap Line 24  from wxproj import point_in_polygon_shap
24    
25    
26  from Thuban.Model.messages import MAP_PROJECTION_CHANGED, \  from Thuban.Model.messages import MAP_PROJECTION_CHANGED, \
27       MAP_LAYERS_CHANGED, LAYER_LEGEND_CHANGED, LAYER_VISIBILITY_CHANGED       MAP_LAYERS_CHANGED, LAYER_CHANGED, LAYER_VISIBILITY_CHANGED
28  from Thuban.Model.layer import SHAPETYPE_POLYGON, SHAPETYPE_ARC, \  from Thuban.Model.layer import SHAPETYPE_POLYGON, SHAPETYPE_ARC, \
29       SHAPETYPE_POINT       SHAPETYPE_POINT
30  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \
# Line 259  class MapCanvas(wxWindow, Publisher): Line 259  class MapCanvas(wxWindow, Publisher):
259      """A widget that displays a map and offers some interaction"""      """A widget that displays a map and offers some interaction"""
260    
261      # Some messages that can be subscribed/unsubscribed directly through      # Some messages that can be subscribed/unsubscribed directly through
262      # the MapCanvas come in fact from other objects. This is a map to      # the MapCanvas come in fact from other objects. This is a dict
263      # map those messages to the names of the instance variables they      # mapping those messages to the names of the instance variables they
264      # actually come from. This delegation is implemented in the      # actually come from. The delegation is implemented in the Subscribe
265      # Subscribe and unsubscribed methods      # and Unsubscribe methods
266      delegated_messages = {LAYER_SELECTED: "selection",      delegated_messages = {LAYER_SELECTED: "selection",
267                            SHAPES_SELECTED: "selection"}                            SHAPES_SELECTED: "selection"}
268    
# Line 417  class MapCanvas(wxWindow, Publisher): Line 417  class MapCanvas(wxWindow, Publisher):
417          printout.Destroy()          printout.Destroy()
418    
419      def SetMap(self, map):      def SetMap(self, map):
420          redraw_channels = (MAP_LAYERS_CHANGED, LAYER_LEGEND_CHANGED,          redraw_channels = (MAP_LAYERS_CHANGED, LAYER_CHANGED,
421                             LAYER_VISIBILITY_CHANGED)                             LAYER_VISIBILITY_CHANGED)
422          if self.map is not None:          if self.map is not None:
423              for channel in redraw_channels:              for channel in redraw_channels:
# Line 741  class MapCanvas(wxWindow, Publisher): Line 741  class MapCanvas(wxWindow, Publisher):
741                  continue                  continue
742    
743              filled = layer.GetClassification().GetDefaultFill() \              filled = layer.GetClassification().GetDefaultFill() \
744                       is not Color.None                       is not Color.Transparent
745              stroked = layer.GetClassification().GetDefaultLineColor() \              stroked = layer.GetClassification().GetDefaultLineColor() \
746                        is not Color.None                        is not Color.Transparent
747    
748              layer_proj = layer.projection              layer_proj = layer.projection
749              if layer_proj is not None:              if layer_proj is not None:

Legend:
Removed from v.551  
changed lines
  Added in v.789

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26