[Qgis-developer] Legend layers vs. Legend layer files
humarco
marco.hugentobler at karto.baug.ethz.ch
Wed Apr 19 09:55:31 EDT 2006
Am Mittwoch 19 April 2006 11:55 schrieb Martin Dobias:
> I'm asking because I'd like to move layer file's popup menu to legend.
The only drawback i see here is that the popup may differ depending on the
layer type (e.g. raster layers have no 'show attribute table'). So there
might be an if in the legend. If now someone decides to add a completely new
layer type which is not raster and not vector, he needs to go to the legend
class and extend the if-clause.
But the advantages of having no gui dependencies in the maplayers are clearly
bigger (and it is very rare that people add new layer types).
> It's really a question what option makes more sense - first layer or
> all. To keep it clear I would suggest that when layer has only one
> layer file, editing can be turned on/of (or attribute table can be
> shown). With more (or zero) layer files, this menu item will be
> visible but disabled for layers and the user must decide which layer
> file to edit...
This sounds good. Most of the times people use only one layer file anyway so
they should not be bothered by the multilayer thing.
Marco
More information about the Qgis-developer
mailing list