Bug report #4480

Increase/decrease priority in rule-based rendering

Added by Paolo Cavallini about 13 years ago. Updated over 12 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
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 #:14407

Description

The buttons Increase/decrease priority in rule-based rendering do not work

test.zip (4.03 KB) Richard Duivenvoorde, 2011-12-29 02:31 AM

History

#1 Updated by Giovanni Manghi almost 13 years ago

  • Target version set to Version 1.7.4

#2 Updated by Richard Duivenvoorde almost 13 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

hi Paolo,

I'm actually busy with this, because using it it appeared that the decreasing and increasing buttons were workinge (in my view), but the selection disappeared every time from the selected item.
Besides that it was possible to select multiple items while all buttons only work when just one item is selected.

I have finished that (will do pull request today), but if you give scenario (and data?) for how it is NOT working for you, I can maybe also have a look into that.

#3 Updated by Paolo Cavallini almost 13 years ago

Load a vector, create two rules, select one, press decrease/increase priority buttons: no effect.
Thanks.

#4 Updated by Richard Duivenvoorde almost 13 years ago

It is working for me.

See attached project+data+style.

If you load that project you have a layer with some points and three rules.

first make sure you UNcheck 'Use only first matched rule' then:

1 You will see green and red dots (NO blue).
Blue has prio 1 meaning all dots will be painted blue FIRST, but then the two other rules paint it red/green

2 If you decrease prio of (no filter) to 3 (in your qgis clicking on rule, click decrease, click on rule again, decrease; in mine (fixed) I just click decrease twice).
Now you will see that dots are all bleu: because FIRST red green rules apply (have higher prio), then the last prio rule will apply, making them blue.

3 if you now CHECK 'Use only first matched rule' and Apply, you will see the red green dots again.
Because red and green have prio 1 and 2 and (no filter)/bleu has prio 3, only prio 1 and 2 will apply, and 3 is not applied anymore.

My conclusion: it just works :-)

If you do not agree, please show me a scenario which fails in your opinion (a little more clear then the one in comment #3 ;-) )

Otherwise, this bug can be closed

#5 Updated by Paolo Cavallini almost 13 years ago

Agreed, it works. Two minor confusing things though:
  • the direction of the arrow is opposite to the actual displacement of the item
  • once moved, focus on the item is lost

#6 Updated by Richard Duivenvoorde almost 13 years ago

I think I fixed all this in https://github.com/qgis/Quantum-GIS/pull/79

focus stays on selected item now

sort on priority once you used the 'increase/decrease priority' button (I did not want to make it the default sorting because priority is not always the main target for a user)

Please test after pull 79 is honoured, and close this ticket if working

#7 Updated by Paolo Cavallini over 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

#8 Updated by Alexander Bruy over 12 years ago

  • Status changed from Open to Feedback

Should be fixed by Martin's improvements for rule-based renderer

#9 Updated by Paolo Cavallini over 12 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF