Bug report #572
change any property of a vector layer (transparency, labels etc.) = the layer gets expanded
|Assignee:||Aaron Racicot -|
|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|
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.
#4 Updated by Tim Sutton about 13 years ago
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.
#5 Updated by Aaron Racicot - about 13 years ago
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.