Bug 462665 - Document creation with isolate layer is broken (Python)
Summary: Document creation with isolate layer is broken (Python)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (other bugs)
Version First Reported In: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-05 10:11 UTC by keyth_qcfx2
Modified: 2022-12-08 12:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description keyth_qcfx2 2022-12-05 10:11:14 UTC
SUMMARY
Creating a document with python creates a broken document.

STEPS TO REPRODUCE
1. with a new instance of Krita
2. run the code given to create a new document
3. draw on the canvas (nothing is seen when drawing)
4. toggle isolate layer (to see drawing)
5. toggle isolate layer again (to hide drawing)

"""
import krita

# Create a Document
newDocument = Krita.instance().createDocument(1920, 1080, "name", "RGBA", "U8", "", 300.0)
Krita.instance().activeWindow().addView(newDocument)
"""

OBSERVED RESULT
it will create a transparent document event though there is a white background.
On step 3  drawing will happen but it is not shown despite the isolate layer state being off.
Activating isolate layer state will in reality deactivate it and show the drawing and you can verify this by swapping between isolate layer state on and off.

EXPECTED RESULT
Create a empty document and see the while background as normal, and when activating or deactivating isolate layer should give the same display because there is only one layer present.

SOFTWARE/OS VERSIONS
Windows: 10
Qt Version: 5.12.12

ADDITIONAL INFORMATION
Saving this document will remain broken on file when loading up I believe.
Comment 1 Halla Rempt 2022-12-08 12:41:48 UTC
Thank you for the report. I can confirm the issue.
Comment 2 Halla Rempt 2022-12-08 12:49:23 UTC
Git commit 8e46179dfab4dc840ea36acef4cb45a6928552f5 by Halla Rempt.
Committed on 08/12/2022 at 12:48.
Pushed by rempt into branch 'master'.

Create a new image with a blank white layer instead of a transparent layer

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

https://invent.kde.org/graphics/krita/commit/8e46179dfab4dc840ea36acef4cb45a6928552f5
Comment 3 Halla Rempt 2022-12-08 12:49:35 UTC
Git commit 733d456242b877191f63a0a4f5c0b00ac14ee7af by Halla Rempt.
Committed on 08/12/2022 at 12:49.
Pushed by rempt into branch 'krita/5.1'.

Create a new image with a blank white layer instead of a transparent layer
(cherry picked from commit 8e46179dfab4dc840ea36acef4cb45a6928552f5)

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

https://invent.kde.org/graphics/krita/commit/733d456242b877191f63a0a4f5c0b00ac14ee7af