Bug report #18005

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

Added by Richard Duivenvoorde about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
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

Description

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 about 6 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

History

#1 Updated by Alexander Bruy about 6 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 about 6 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
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/Postprocessing.py#L79
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 about 6 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 about 6 years ago

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

#6 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF