bh: thuban/Thuban/UI projdialog.py,1.39,1.39.2.1

cvs@intevation.de cvs at intevation.de
Thu Dec 16 11:56:19 CET 2004


Author: bh

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

Modified Files:
      Tag: thuban-1-0-branch
	projdialog.py 
Log Message:
(ProjFrame._show_proj_panel): If the
panel to be shown is the UnknownProjPanel disable the OK and Try
buttons.  Otherwise enable them.
(ProjFrame.__GetProjection): The UnknownProjPanel returns None for
the parameters.  In that case __GetProjection also returns None
now.


Index: projdialog.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/projdialog.py,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -d -r1.39 -r1.39.2.1
--- projdialog.py	21 Jan 2004 17:09:15 -0000	1.39
+++ projdialog.py	16 Dec 2004 10:56:17 -0000	1.39.2.1
@@ -1,4 +1,4 @@
-# Copyright (c) 2003 by Intevation GmbH
+# Copyright (c) 2003, 2004 by Intevation GmbH
 # Authors:
 # Jonathan Coles <jonathan at intevation.de>
 # Frank Koormann <frank.koormann at intevation.de>
@@ -530,10 +530,14 @@
     def _show_proj_panel(self, panel_class):
         """Show the panel as the projection panel"""
         if panel_class is UnknownProjPanel:
+            self.button_ok.Disable()
+            self.button_try.Disable()
             self.edit_box.Disable()
             self.nbsizer.Activate(self.unknown_projection_panel)
             self.curProjPanel = self.unknown_projection_panel
         else:
+            self.button_ok.Enable(True)
+            self.button_try.Enable(True)
             self.edit_box.Enable(True)
             self.unknown_projection_panel.Hide()
             for panel in self.projection_panels:
@@ -569,8 +573,9 @@
         # self.curProjPanel should always contain the most relevant data
         # for a projection
         if self.curProjPanel is not None:
-            return Projection(self.curProjPanel.GetParameters(),
-                              self.projname.GetValue())
+            parameters = self.curProjPanel.GetParameters()
+            if parameters is not None:
+                return Projection(parameters, self.projname.GetValue())
 
         return None
 





More information about the Thuban-devel mailing list

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