[Thuban-devel] Re: popup menu

Bernhard Herzog bh at intevation.de
Tue Apr 20 17:27:36 CEST 2004


Frank Koormann <frank.koormann at intevation.de> writes:

> Currently a lot of methods are placed in the mainwindow.py - and 
> all of this is quite unbalanced: E.g. on one hand the sequence to 
> deepcopy a layer is placed in mainwindow.

I guess you're talking about DuplicateLayer.  That method should be
split into two.  The actual duplication should be done in a method of
the layer, of course, and the mainwindow method should simply call that
method on the currently selected layer.

> So, yes, I support to discuss a better separation. This could mean that
> all layer related stuff goes into the legend

It shouldn't be in the legend.  The legend window for instance can be
switched off.

It might be better to introduce a new class for the interaction logic.
We could revive the interactor class for that.  The interactor manages
the selection (the Selection instance currently owned by viewport) for
that, and has methods for all commands that work on the currently
selected layer.  Those methods would mostly just delegate the actual
work to the appropriate method of the currently selected layer or the
map (or whatever).  The mainwindow and the legend would be just views on
the interactor.

   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)