/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/session.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/session.py

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

revision 232 by bh, Fri Jul 19 15:14:57 2002 UTC revision 318 by bh, Fri Sep 13 14:21:12 2002 UTC
# Line 51  class Session(TitledObject, Modifiable): Line 51  class Session(TitledObject, Modifiable):
51      # message channels that have to be forwarded from maps contained in      # message channels that have to be forwarded from maps contained in
52      # the session.      # the session.
53      forwarded_channels = (      forwarded_channels = (
54            # generic channels
55            CHANGED,
56    
57          # map specific channels          # map specific channels
58          MAP_PROJECTION_CHANGED,          MAP_PROJECTION_CHANGED,
59          LAYERS_CHANGED,          LAYERS_CHANGED,
# Line 98  class Session(TitledObject, Modifiable): Line 101  class Session(TitledObject, Modifiable):
101              map.Subscribe(channel, self.forward, channel)              map.Subscribe(channel, self.forward, channel)
102          self.changed(MAPS_CHANGED)          self.changed(MAPS_CHANGED)
103    
104        def RemoveMap(self, map):
105            for channel in self.forwarded_channels:
106                map.Unsubscribe(channel, self.forward, channel)
107            self.maps.remove(map)
108            self.changed(MAPS_CHANGED)
109            map.Destroy()
110    
111      def Extensions(self):      def Extensions(self):
112          return self.extensions          return self.extensions
113    
# Line 115  class Session(TitledObject, Modifiable): Line 125  class Session(TitledObject, Modifiable):
125              map.Destroy()              map.Destroy()
126          self.maps = []          self.maps = []
127          self.tables = []          self.tables = []
128          Publisher.Destroy(self)          Modifiable.Destroy(self)
129    
130      def forward(self, *args):      def forward(self, *args):
131          """Reissue events.          """Reissue events.

Legend:
Removed from v.232  
changed lines
  Added in v.318

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26