Bug 394015

Summary: Closing documents through API leaves empty tabs behind
Product: [Applications] krita Reporter: Jeroen Hoolmans <jhoolmans>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 4.0.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Simply tell the view that's about to close to close it's subwindow.

Description Jeroen Hoolmans 2018-05-08 19:13:51 UTC
Closing a document through python does not close the tab.

Test plan:

1. Create or open a document
2. Run python script:

from krita import Krita
kt = Krita.instance()
document = kt.activeDocument()
document.close()
Comment 1 Jeroen Hoolmans 2018-05-14 19:47:40 UTC
Created attachment 112652 [details]
Simply tell the view that's about to close to close it's subwindow.

Attaching the patch here since Phabricator is down.
Comment 2 Halla Rempt 2018-05-15 10:19:58 UTC
Git commit 8fba6ddf8ebd0515ce56dbd3ae69a52d9f85f010 by Boudewijn Rempt.
Committed on 15/05/2018 at 09:29.
Pushed by rempt into branch 'master'.

Close the view when closing a document through libkis
patch by Jeroen Hoolmans, thanks!

M  +1    -0    libs/libkis/Document.cpp

https://commits.kde.org/krita/8fba6ddf8ebd0515ce56dbd3ae69a52d9f85f010