Bug report #18005
Processing temporary layers style change not picked up in legend/layer list
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25901|
To recreate, in current master:
- load a simple point layer
- create a buffer in processing
- it will (here) create a brown style: visibl both in the temporary layer AND in the layer list
- now in the layer properties, styling tab change the color for example to green
- upon 'apply', now the color of the buffer features will be updated
- but the colors in the legend will stay old (brown)
I also tried to not create the temporary layer, but create a geopackage immidiatly, but this shows the same behaviour.
When creating a temporary layer from scratch, though styling just works.
Ensure member QObjects for QgsMapLayer (and subclasses) are correctly
parented to their owner QgsMapLayer.
This ensures that if the layer is moved to a different thread with
QObject::moveToThread(), then those children are also considered
by QObject::moveToThread() and correctly also moved to the new
target thread. This fixes broken connections (and likely other
issues) caused when moving layers between threads (such as is
done when a background processing algorithm completes).
#2 Updated by Richard Duivenvoorde over 3 years ago
Nope, only when you create a new vector layer with processing...
If you save the result layer as a shape file, load it, then the styling is ok
I did try to have a look to, and only thing I could think of is that the 'takeMapLayer' which is used in
and which according to some docs I found 'hands over ownership', maybe looses some 'repaint' signals or so?
But please just try the buffer scenario I described in the issue..