/[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 2364 by joey, Fri Oct 1 18:18:49 2004 UTC revision 2516 by frank, Sun Jan 9 12:32:17 2005 UTC
# Line 35  from Thuban.UI.multiplechoicedialog impo Line 35  from Thuban.UI.multiplechoicedialog impo
35  import view  import view
36  import tree  import tree
37  import tableview, identifyview  import tableview, identifyview
 from Thuban.UI.classifier import Classifier  
38  import legend  import legend
39  from menu import Menu  from menu import Menu
40    
# Line 53  import Thuban.Model.resource Line 52  import Thuban.Model.resource
52    
53  import projdialog  import projdialog
54    
55    from Thuban.Lib.classmapper import ClassMapper
56    
57    layer_properties_dialogs = ClassMapper()
58    
59  class MainWindow(DockFrame):  class MainWindow(DockFrame):
60    
# Line 651  class MainWindow(DockFrame): Line 653  class MainWindow(DockFrame):
653                                layer.ShapeStore(),                                layer.ShapeStore(),
654                                projection = layer.GetProjection())                                projection = layer.GetProjection())
655              new_classification = copy.deepcopy(layer.GetClassification())              new_classification = copy.deepcopy(layer.GetClassification())
656                new_layer.SetClassificationColumn(
657                                    layer.GetClassificationColumn())
658              new_layer.SetClassification(new_classification)              new_layer.SetClassification(new_classification)
659              self.Map().AddLayer(new_layer)              self.Map().AddLayer(new_layer)
660    
# Line 729  class MainWindow(DockFrame): Line 733  class MainWindow(DockFrame):
733          currently selected layer if one is defined for this layer          currently selected layer if one is defined for this layer
734          type.          type.
735          """          """
736          name = "layer_properties" + str(id(layer))          dialog_class = layer_properties_dialogs.get(layer)
737          self.OpenOrRaiseDialog(name, Classifier, layer, group = group)  
738                    if dialog_class is not None:
739                name = "layer_properties" + str(id(layer))
740                self.OpenOrRaiseDialog(name, dialog_class, layer, group = group)
741    
742      def LayerJoinTable(self):      def LayerJoinTable(self):
743          layer = self.canvas.SelectedLayer()          layer = self.canvas.SelectedLayer()
744          if layer is not None:          if layer is not None:

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26