Bug 466097

Summary: `setActiveNode` followed by fill does not work as expected
Product: [Applications] krita Reporter: alexandre
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 5.1.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Python script to reproduce the bug

Description alexandre 2023-02-19 18:03:28 UTC
Created attachment 156504 [details]
Python script to reproduce the bug

SUMMARY
***
When creating a selection, then creating and activating a layer (a.k.a. node) and finaly filling the selection, fill is done on the former layer. Like if `setActiveNode` did not work.
***

STEPS TO REPRODUCE
1.  run the script in attachment on a greyscale image.

OBSERVED RESULT
fill is done on the former layer

EXPECTED RESULT
fill should be done on the new layer

SOFTWARE/OS VERSIONS
Linux salers 6.1.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 09 Feb 2023 20:06:08 +0000 x86_64 GNU/Linux
Qt Version: 5.15.8+kde+r181-1

ADDITIONAL INFORMATION
None
Comment 1 Halla Rempt 2023-03-06 14:08:04 UTC
Weirdly enough when I run the script, I get an error: NoneType object has no attribute "grow" on line 21.