[Qgis-developer] Selection color in Composition

Nyall Dawson nyall.dawson at gmail.com
Fri Jan 20 15:20:39 PST 2017


On 21 January 2017 at 02:13, René-Luc Dhont <rldhont at gmail.com> wrote:
> Hi devs,
>
> How the selection color is set in composition ?

It's not - compositions never show the selection.

I suspect it was this 3 year old commit which broke the server
behaviour: https://github.com/qgis/QGIS/commit/aaa7003 . This was done
to prevent accidental selections showing in exports from composer. My
guess is that this broke the selection behaviour in composer, but
given that there was no unit test and no-one has noticed it until now
I'm guessing this feature is not used often on server! (I didn't even
know it was something server supported)

>
> I found a regression in QGIS Server about selection in GetPrint request. I'd
> like to fix it but I don't know which commit has generated this regression.
> It is the reason of my question.

How is this supposed to work on server? Is the selection color
configurable? Does it affect all maps in a composition or do you
specify which map to show a selection in?

You'll probably need to do something like:

- add a Flag enum to QgsComposition, with a ShowSelection option
- Q_DECLARE_FLAGS this to a QgsComposition::Flags type
- Add a flags()/setFlags() option to composition so that server can
set the ShowSelection flag
- Make QgsComposerMap::mapSettings check the associated compositions
flags to determine whether the selection should be shown
- (If selection color is configurable) add a getter/setter to
QgsComposition to set the selection color

Nyall


>
> Regars,
> René-Luc
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list