joey: thuban/Thuban/UI mainwindow.py,1.134,1.135

cvs@intevation.de cvs at intevation.de
Fri Oct 1 20:22:34 CEST 2004


Author: joey

Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv28298/Thuban/UI

Modified Files:
	mainwindow.py 
Log Message:
Utilise the new ClassMapper for global registration of properties
dialog classes (which are indeed layer-specific).

Index: mainwindow.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/mainwindow.py,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- mainwindow.py	1 Oct 2004 18:18:49 -0000	1.134
+++ mainwindow.py	1 Oct 2004 18:22:32 -0000	1.135
@@ -35,7 +35,6 @@
 import view
 import tree
 import tableview, identifyview
-from Thuban.UI.classifier import Classifier
 import legend
 from menu import Menu
 
@@ -53,6 +52,9 @@
 
 import projdialog
 
+from Thuban.Lib.classmapper import ClassMapper
+
+layer_properties_dialogs = ClassMapper()
 
 class MainWindow(DockFrame):
 
@@ -729,9 +731,12 @@
         currently selected layer if one is defined for this layer
         type.
         """
-        name = "layer_properties" + str(id(layer))
-        self.OpenOrRaiseDialog(name, Classifier, layer, group = group)
-        
+        dialog_class = layer_properties_dialogs.get(layer)
+
+        if dialog_class is not None:
+            name = "layer_properties" + str(id(layer))
+            self.OpenOrRaiseDialog(name, dialog_class, layer, group = group)
+
     def LayerJoinTable(self):
         layer = self.canvas.SelectedLayer()
         if layer is not None:





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)