https://bugs.kde.org/show_bug.cgi?id=432226
            Bug ID: 432226
           Summary: Calling setVisible() on a node's color channels does
                    not behave as expected.
           Product: krita
           Version: 4.4.2
          Platform: macOS (DMG)
                OS: macOS
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: chris.ven...@gmail.com
  Target Milestone: ---

SUMMARY

The python Channel.setVisible() scripting call does not behave as expected.
Rather than individually addressing the specified channel's visibility, it
affects all other channels' visibilities too.

STEPS TO REPRODUCE
1. Start Krita
2. Create a new blank document
3. Open the Tools->Scripts->Scripter
4. Run the following script in the scripter:

    from krita import *
    activeView = Krita.instance().activeWindow().activeView()
    activeDocument = activeView.document()
    activeNode = activeDocument.activeNode()
    for i in range(4):
        activeNode.channels()[i].setVisible(False)

5. Open the layer's properties dialog
6. Observe the active channel status

OBSERVED RESULT

All three color channels are active (ticked), only the alpha channel is
inactive (unticked)

EXPECTED RESULT

All four channels should be inactive (unticked)


SOFTWARE/OS VERSIONS
Windows: Not tested
macOS: Catalina 10.15.6: Tested, bug is always reproducible
Linux/KDE Plasma: Not tested
(available in About System)
KDE Plasma Version: NA
KDE Frameworks Version: NA
Qt Version: NA

ADDITIONAL INFORMATION

Further testing shows that whenever a setVisible(X) call is made on a channel,
all other channel visibilities are reset to true,
and only the last channel's visibility is correctly set.

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

Reply via email to