Bug report #18005

Processing temporary layers style change not picked up in legend/layer list

Added by Richard Duivenvoorde almost 5 years ago. Updated almost 5 years ago.

Assignee:Victor Olaya
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.

Associated revisions

Revision 0607f79f
Added by Nyall Dawson almost 5 years ago

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).

Fixes #18005


#1 Updated by Alexander Bruy almost 5 years ago

  • Status changed from Open to Feedback

Does this happen with layers added to project from disk or created in other way? Processing itself does nothing with styling, looks like refreshing layer tree is broken.

#2 Updated by Richard Duivenvoorde almost 5 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..

#3 Updated by Raymond Nijssen almost 5 years ago

Hi Alexander,

Alexander Bruy wrote:

... Processing itself does nothing with styling, ...

So what could explain that the buffer result always gets the same brown (#813d02) color now?

#5 Updated by Nyall Dawson almost 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

#6 Updated by Giovanni Manghi almost 5 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF