Bug 504309

Summary: Node.save() does not respect Document.batchmode()
Product: [Applications] krita Reporter: uruwi
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.9   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description uruwi 2025-05-16 06:17:52 UTC
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