Bug 394261 - API: Loading documents in batchmode still show dialogs.
Summary: API: Loading documents in batchmode still show dialogs.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 4.0.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-14 20:51 UTC by Jeroen Hoolmans
Modified: 2018-05-16 18:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Proposed patch to set documents (647 bytes, patch)
2018-05-14 20:51 UTC, Jeroen Hoolmans
Details
Sample low alpha exr (16-bit float) (64.54 KB, image/x-exr)
2018-05-14 20:56 UTC, Jeroen Hoolmans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Hoolmans 2018-05-14 20:51:25 UTC
Created attachment 112657 [details]
Proposed patch to set documents

Loading certain EXR files still show the alpha modified warning while opening.
It listens to the Documents fileBatchmode, but the api won't let you load a file through a Document object.

Tested with:

from krita import Krita
kt = Krita.instance()
kt.setBatchmode(True)
doc = kt.openDocument("file_with_low_alphas.exr")
kt.setBatchmode(False)


The supplied patch will set the Documents fileBatchmode to match active Krita batchmode() before loading, and sets it back to false when done.
Comment 1 Jeroen Hoolmans 2018-05-14 20:56:37 UTC
Created attachment 112658 [details]
Sample low alpha exr (16-bit float)
Comment 2 Halla Rempt 2018-05-15 08:14:18 UTC
Git commit 65074c27027e58fb61df8162b08aa56e5089e98c by Boudewijn Rempt.
Committed on 15/05/2018 at 08:12.
Pushed by rempt into branch 'master'.

Also obey batchmode when loading a document from libkis
Patch by Jeroen Hoolmans, thanks!

M  +2    -0    libs/libkis/Krita.cpp

https://commits.kde.org/krita/65074c27027e58fb61df8162b08aa56e5089e98c
Comment 3 Halla Rempt 2018-05-16 18:27:29 UTC
Git commit 8896a01c0f5d702113545991e5d02ab446903cce by Boudewijn Rempt.
Committed on 16/05/2018 at 18:19.
Pushed by rempt into branch 'krita/4.0'.

Also obey batchmode when loading a document from libkis
Patch by Jeroen Hoolmans, thanks!

(cherry picked from commit 65074c27027e58fb61df8162b08aa56e5089e98c)

M  +2    -0    libs/libkis/Krita.cpp

https://commits.kde.org/krita/8896a01c0f5d702113545991e5d02ab446903cce