jan: thuban/Thuban/UI mainwindow.py,1.130,1.131
Bernhard Herzog
bh at intevation.de
Fri Apr 16 10:49:51 CEST 2004
cvs at intevation.de writes:
> def LayerShowTable(self):
> + """
> + Present a TableView Window for the current layer.
> + In case the window is already open, bring it to the front.
> + In case, there is no active layer, do nothing.
> + In case, the layer has not ShapeStore, raise a corresponding message dialog
> + and do nothing else.
> + """
> layer = self.current_layer()
> if layer is not None:
> + if not hasattr(layer, "ShapeStore"):
> + self.RunMessageBox(_("Show Table"),
> + _("The layer '%s' has no table." % layer.Title()))
> + return
I don't think we should raise a dialog box here. We don't show one
either when there's no selection. We should make sure that the commands
that call this method are grayed out. The one in the main window does
this with the has_selected_shape_layer method. The context menu should
do something similar if it doesn't do that yet.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://sketch.sourceforge.net/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)