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

Color ramp API improvements, fixes + some style dock inlining #3432

Merged
merged 7 commits into from
Aug 25, 2016

Conversation

nyalldawson
Copy link
Collaborator

  • renames color ramps to remove Vector prefix (they are used everywhere now) and for clearer names
  • rework ramp dialogs so they don't edit ramps in place. This is too fragile and runs into pointer lifetime issues
  • makes the color brewer ramp editor and limited random ramp editor show inline in the layer style dock

@nyalldawson nyalldawson added the API Break! Breaks stable API. Proceed with extreme caution!! label Aug 24, 2016
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.

Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.

Also fix a bunch of leaks relating to cloning color ramps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Break! Breaks stable API. Proceed with extreme caution!!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant