https://bugs.kde.org/show_bug.cgi?id=478763

            Bug ID: 478763
           Summary: Document.setActiveNode method does nothing on
                    FileLayer
    Classification: Applications
           Product: krita
           Version: 5.2.2
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: leroyr...@ymail.com
  Target Milestone: ---

Created attachment 164307
  --> https://bugs.kde.org/attachment.cgi?id=164307&action=edit
This script reproduces the issue

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug
symbols.
See
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Hello,

seems that the method "setActiveNode" doesn't work for FileLayer. I'm executing
the attached script that simply creates a FileLayer, adds it as child of the
rootNodes and makes it being the active node.
The issue is that after the last method (setActiveNode), the created FileLayer
IS not the active node.

Note: Try with paint layer the behavior is a little bit different. The paint
layer is selected after the end of the script so that when you execute the
script twice, the active node of the second attempt is the layer created during
the first attempt.

STEPS TO REPRODUCE
1. Create a new python script to be executed by the Scripter of Krita
2. Create a new File Layer
3. Add the new File Layer to the root node children list.
4. Call the method "setActiveNode" of the Document, with the new File Layer as
argument

OBSERVED RESULT
The current active node is NOT the new File Layer but the node that was active
before the call of the method "setActiveNode"

EXPECTED RESULT
The current active node should have been the new File Layer so that we can
apply some actions on it.

SOFTWARE/OS VERSIONS
Windows: 11
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to