Bug report #7549

in latest qgis master the selection color is black, even if in the properties is the standard yellow

Added by Giovanni Manghi over 9 years ago. Updated over 9 years ago.

Category:Map Canvas
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16492


see attached screenshot

47.png (250 KB) Giovanni Manghi, 2013-04-08 02:05 PM

Associated revisions

Revision 1a723b4c
Added by Martin Dobias over 9 years ago

Fix #7549 (selection color is now stored in QgsRendererContext)


#1 Updated by Regis Haubourg over 9 years ago

maybe it is related to blending modes side effects?

#2 Updated by Larry Shaffer over 9 years ago

Sounds like a QgsColorButton issue. Can't reproduce it here, but I copied over my previous pre-2.0 app settings (on Mac).

Is the Project Option's selection color button black? (That's the default color for the button, if one is not set.)

There is no indication in main Options that the current project overrides the app's selection color. Likewise, there seems to be no way to 'undo' a set project selection color, i.e. revert to app's.

#3 Updated by Larry Shaffer over 9 years ago

Ok, after temporarily removing my app prefs file, I could repeat the issue. It occurs because the undefined project's selection color is defaulting to black (even though it doesn't show that in the color button, which defaults to copying the app's, if it is not set).

To fix, open Project Options and click save. So, have to find why that is defaulting to black for the project.

#4 Updated by Larry Shaffer over 9 years ago

Could be related to "this recent commit to master":commit:7cc3031f8884d768fe8405b7249cdc18e3c2571b"

Maybe Martin can shed light on the issue. Seems like maybe the new static QColor mSelectionColor of QgsSymbolV2RenderContext [0] isn't being updated or maybe it is being overridden later by a new context that doesn't read the settings(?).

[0] commit:7cc3031f8884d768fe8405b7249cdc18e3c2571b#L22R206

#5 Updated by Martin Dobias over 9 years ago

Yes I may have broken something (though it seemed to work for me): I will have a look at that. The way how the selection is being handled (static variable) is rubbish anyway.

#6 Updated by Borys Jurgiel over 9 years ago

Larry, isn't it introduced in 5e39bac1f9da74d8c084462608850f76b4e783a6 ?
See #7572

#7 Updated by Martin Dobias over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF