/[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 2363 by joey, Fri Oct 1 18:07:14 2004 UTC revision 2364 by joey, Fri Oct 1 18:18:49 2004 UTC
# Line 349  class MainWindow(DockFrame): Line 349  class MainWindow(DockFrame):
349          """          """
350          self.SetStatusText(text)          self.SetStatusText(text)
351    
352        def OpenOrRaiseDialog(self, name, dialog_class, *args, **kw):
353            """
354            Open or raise a dialog.
355    
356            If a dialog with the denoted name does already exist it is
357            raised.  Otherwise a new dialog, an instance of dialog_class,
358            is created, inserted into the main list and displayed.
359            """
360            dialog = self.get_open_dialog(name)
361    
362            if dialog is None:
363                dialog = dialog_class(self, name, *args, **kw)
364                self.add_dialog(name, dialog)
365                dialog.Show(True)
366            else:
367                dialog.Raise()
368                              
369      def save_modified_session(self, can_veto = 1):      def save_modified_session(self, can_veto = 1):
370          """If the current session has been modified, ask the user          """If the current session has been modified, ask the user
371          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
# Line 705  class MainWindow(DockFrame): Line 722  class MainWindow(DockFrame):
722          self.OpenLayerProperties(layer)          self.OpenLayerProperties(layer)
723    
724      def OpenLayerProperties(self, layer, group = None):      def OpenLayerProperties(self, layer, group = None):
725          name = "layer_properties" + str(id(layer))          """
726          dialog = self.get_open_dialog(name)          Open or raise the properties dialog.
   
         if dialog is None:  
             dialog = Classifier(self, name, layer, group)  
             self.add_dialog(name, dialog)  
             dialog.Show()  
         dialog.Raise()  
727    
728            This method opens or raises the properties dialog for the
729            currently selected layer if one is defined for this layer
730            type.
731            """
732            name = "layer_properties" + str(id(layer))
733            self.OpenOrRaiseDialog(name, Classifier, layer, group = group)
734            
735      def LayerJoinTable(self):      def LayerJoinTable(self):
736          layer = self.canvas.SelectedLayer()          layer = self.canvas.SelectedLayer()
737          if layer is not None:          if layer is not None:

Legend:
Removed from v.2363  
changed lines
  Added in v.2364

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26