Bug report #572

change any property of a vector layer (transparency, labels etc.) = the layer gets expanded

Added by Redmine Admin over 13 years ago. Updated about 11 years ago.

Status:Closed
Priority:Low
Assignee:Aaron Racicot -
Category:Map Legend
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10631

Description

This is not necessary, and happens to be diturbing - I have to re-collapse the layer each time I change it's transparency percentage, or any other property.

Maciek

bug572fix.patch Magnifier (4.73 KB) Aaron Racicot -, 2007-11-28 06:30 PM

bug572fix_take2.patch Magnifier (3.88 KB) Aaron Racicot -, 2007-11-29 12:23 AM

History

#1 Updated by Tim Sutton over 13 years ago

Moved to milestone 0.8.2 since we wont be fixing any further issues before the 0.8.1 release

#2 Updated by Aaron Racicot - almost 13 years ago

  • Status changed from Open to In Progress

#3 Updated by Aaron Racicot - almost 13 years ago

Patch attached to fix this bug. Added bool value to signal for legend refresh to specify whether the legend item is expanded. Submitted by CUGOS group 11/28/07.

#4 Updated by Tim Sutton almost 13 years ago

Hi

I wonder what effect this change in qgsapplicatoninterface will have on third party apps:

148 qgis->legend()->refreshLayerSymbology( l->getLayerID() );
148 qgis->legend()->refreshLayerSymbology( l->getLayerID(), true );

While we dont promise binary comatibility between releases it will be nice to maintain it where poss. I wonder if useing a default of bool expand=true would not be better so that we can leave the qgsapplication api unchanged if possible.

Regards

Tim

#5 Updated by Aaron Racicot - almost 13 years ago

Hi Tim,

Well, the API in qgsapplication did not actually change... only the api for QgsLegend::refreshLayerSymbology and the signal refreshLegend had actually changed. In the qgsapplication the "default" value was just being passed in as a hard coded "true". I agree that this should actually just be a default value on the second param to QgsLegend::refreshLayerSymbology. I went ahead and made the change so now the prototype for that is:

void refreshLayerSymbology(QString key, bool expandItem = true);

This allows all of the original calls to refreshLayerSymbology to remain unchanged and just the new param that is added to the refreshLegend signal is passed on to refreshLayerSymbology to override the default true value.

Hope this better follows the conventions... a new patch is attached.

Aaron

#6 Updated by Tim Sutton almost 13 years ago

Hi

You patch was applied as 97bb326f (SVN r7684) - many thanks!

Regards

Tim

#7 Updated by Aaron Racicot - almost 13 years ago

  • Status changed from In Progress to Closed
  • Resolution set to fixed

Marking as fixed after Tim applied the patch. Thanks Tim

#8 Updated by Anonymous about 11 years ago

Milestone Version 0.9.1 deleted

Also available in: Atom PDF