-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[FEATURE] Layer tree view indicator for non-removable (required) layers #7862
[FEATURE] Layer tree view indicator for non-removable (required) layers #7862
Conversation
Style-wise, the icon should be outline-only. Other than that, cool :) |
There is a lot of mostly duplicate code going on here. Reducing this would be good if it's possible! One thing I noticed lately too which would be good to address is that indicators stop working if you move a layer into a different group. |
mFlags = flags; | ||
emit flagsChanged(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flags are also changed in readLayerStyle at line 418 and 420.
I was a bit lazy....let's call setFlags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 44611d7
@nirvn is the new icon better? Sorry I'm not a graphic designer :-) |
I would like to do it after the feature freeze if fellow devs do not object - there are few more bits on my plate until Friday :-)
@nyalldawson I was told this before but I have never seen it myself :-( Is replicating as simple as starting a project with one memory layer (which shows an indicator), add a group, move the layer there - and the indicator is gone? Because that works just fine for me... |
Maybe it's in nested groups. Let me check |
Fine with me! |
Ok try this
|
Thanks Nyall - I could finally replicate the issue - it is related to drag'n'drop of the layer and the fact that we disconnect from the signal even though the layer is still present. Will fix when doing the code de-duplication. |
@wonder-sk , looking much better. To be consistent, we'd need a 1px light gray shadow of the outline. I can easily add that to the new file you've created after you merged this if that helps. |
Thanks! |
It makes it easier for the user understand that the layers are marked as such in project properties.
I am thinking of adding a parent class for layer-based indicators to lower the amount of duplicate code. Or maybe even merge all layer-based indicator providers into one? Not sure.
cc @ghtmtt