Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose settings for overriding selection color and selection symbol for vector layers #53977

Merged
merged 7 commits into from Jul 29, 2023

Conversation

nyalldawson
Copy link
Collaborator

Allows for users to control whether a specific color or symbol should be used in place of the defaults for a particular layer. This is useful to improve the visibility of selected features with certain symbology. E.g:

  • if the layer uses a yellow color by default then the standard yellow selection won't be visible
  • if a line layer uses a thin symbol, then coloring the lines might not make them visible enough -- in this case overriding the symbol with a thicker line can help
  • if the layer uses raster symbology or gradient fills/lines/shapeburst with color ramp symbology, then the default selection color is not applied at all. In this case the user can now set a specific simpler symbol to use for selected features in the layer.

image

Fixes #14467
Fixes #19242
Fixes #21828
Fixes #24593
Fixes #22778

QgsMapLayerSelectionProperties exposes settings for controlling
how an individual QgsMapLayer behaves with respect to feature selection.
a vector layer

If set, then that symbol will be used for selected features. Allows
eg selected lines to be rendered in a thicker line style vs
non-selected lines for improved visibility.
@nyalldawson nyalldawson added Feature Symbology Related to vector layer symbology or renderers Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Jul 28, 2023
@qgis-bot
Copy link
Collaborator

@nyalldawson
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@github-actions github-actions bot added this to the 3.34.0 milestone Jul 28, 2023
@qgis-bot
Copy link
Collaborator

@nyalldawson

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson , thanks for going that extra mile :)

@nyalldawson nyalldawson merged commit e4244ef into qgis:master Jul 29, 2023
28 of 29 checks passed
@nyalldawson nyalldawson deleted the selection_color branch July 29, 2023 08:36
@github-actions
Copy link

@nyalldawson
A documentation ticket has been opened at qgis/QGIS-Documentation#8414
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Symbology Related to vector layer symbology or renderers
Projects
None yet
4 participants