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

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

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

revision 122 by frank, Fri Apr 26 09:30:41 2002 UTC revision 123 by bh, Mon Apr 29 18:05:04 2002 UTC
# Line 1  Line 1 
1  # Copyright (C) 2001 by Intevation GmbH  # Copyright (C) 2001, 2002 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jan-Oliver Wagner <[email protected]>  # Jan-Oliver Wagner <[email protected]>
4  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
# Line 30  import tableview, identifyview Line 30  import tableview, identifyview
30    
31  import main  import main
32  from command import registry, Command  from command import registry, Command
33  from messages import SELECTED_SHAPE  from messages import SELECTED_SHAPE, VIEW_POSITION
34    
35    
36  # the directory where the toolbar icons are stored  # the directory where the toolbar icons are stored
# Line 111  class MainWindow(wxFrame): Line 111  class MainWindow(wxFrame):
111    
112          # Create the map canvas          # Create the map canvas
113          canvas = view.MapCanvas(self, -1, interactor)          canvas = view.MapCanvas(self, -1, interactor)
114            canvas.Subscribe(VIEW_POSITION, self.view_position_changed)
115          self.canvas = canvas          self.canvas = canvas
116    
117          self.init_dialogs()          self.init_dialogs()
# Line 223  class MainWindow(wxFrame): Line 224  class MainWindow(wxFrame):
224      def get_open_dialog(self, name):      def get_open_dialog(self, name):
225          return self.dialogs.get(name)          return self.dialogs.get(name)
226    
227        def view_position_changed(self):
228            pos = self.canvas.CurrentPosition()
229            if pos is not None:
230                text = "(%10.10g, %10.10g)" % pos
231            else:
232                text = ""
233            self.SetStatusText(text)
234    
235      def save_modified_session(self, can_veto = 1):      def save_modified_session(self, can_veto = 1):
236          """If the current session has been modified, ask the user          """If the current session has been modified, ask the user
237          whether to save it and do so if requested. Return the outcome of          whether to save it and do so if requested. Return the outcome of

Legend:
Removed from v.122  
changed lines
  Added in v.123

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26