Created attachment 111241 [details] This image shows the inconsitency between the canvas & the layers docker When layers are hidden from the "Scripter" extension the canvas is not updated. However, the "Layer" docker is updated. Note: This happens on krita-nightly-x64-v4.0.0.51-594-gba8550543c Here is a simple sample code to reproduce this issue: --- from krita import * doc = Krita.instance().activeDocument() if doc is not None: for node in doc.topLevelNodes(): node.setVisible(False) else: print("No active document.") ---
You should call doc.refreshProjection() after adding a node to update the view. We made that a separate step because updating the projection after adding a node can take a lot of time. So, I'm not sure whether this really is a bug that should be fixed...
Thanks a lot it makes a lot of sense. So yes indeed that's not a bug in my sense. Just me being lazy to figure it out or simply a lack of documentation regarding this specific thing. I actually looked for Document/Node::updateXXX, Document/Node::invalidate() or Document/Node::validate() but didn't find the Document::refreshXXX() one ;) It works fine.
Okay, then we can close this? I'll try to figure out how to improve the dox; right now, the example for this is with cerateFillLayer