Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#572 closed defect (fixed)

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

Reported by: tutey@… Owned by: aaronr
Priority: major: does not work as expected Milestone:
Component: Map Legend Version: 0.8
Keywords: Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

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

Attachments (2)

bug572fix.patch (4.7 KB ) - added by aaronr 16 years ago.
bug572fix_take2.patch (3.9 KB ) - added by aaronr 16 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by timlinux, 17 years ago

Milestone: Version 0.8.1Version 0.8.2

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

comment:2 by aaronr, 16 years ago

Awaiting user input: unset
Owner: changed from nobody to aaronr
Status: newassigned

by aaronr, 16 years ago

Attachment: bug572fix.patch added

comment:3 by aaronr, 16 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.

comment:4 by timlinux, 16 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

comment:5 by aaronr, 16 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

by aaronr, 16 years ago

Attachment: bug572fix_take2.patch added

comment:6 by timlinux, 16 years ago

Hi

You patch was applied as r7683 - many thanks!

Regards

Tim

comment:7 by aaronr, 16 years ago

Resolution: fixed
Status: assignedclosed

Marking as fixed after Tim applied the patch. Thanks Tim

comment:8 by (none), 15 years ago

Milestone: Version 0.9.1

Milestone Version 0.9.1 deleted

Note: See TracTickets for help on using tickets.