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

            Bug ID: 504309
           Summary: Node.save() does not respect Document.batchmode()
    Classification: Applications
           Product: krita
      Version First 5.2.9
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: ur...@protonmail.com
  Target Milestone: ---

SUMMARY: When `Node`’s `save` method is called, a dialog box is shown for the
export regardless of whether `batchmode` is enabled for the document.


STEPS TO REPRODUCE
1. Run the following code in Scripter:

```
from krita import *

kr = Krita.instance()
document = kr.activeDocument()

export_config = InfoObject()
export_config.setProperty("alpha", True)
export_config.setProperty("compression", 9)
export_config.setProperty("forceSRGB", True)
export_config.setProperty("indexed", False)
export_config.setProperty("interlaced", False)
export_config.setProperty("saveSRGBProfile", False)
export_config.setProperty("transparencyFillColor", [0, 0, 0, 0])

document.setBatchmode(True)
# document.exportImage("aaa.png", export_config) # executes without showing a
dialog as expected
document.rootNode().save("aaa.png", document.xRes(), document.yRes(),
export_config) # shows a dialog!
```

OBSERVED RESULT: A dialog box is shown for the export.

EXPECTED RESULT: No dialog box should be shown.


SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION: n/a

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

Reply via email to