[krita] [Bug 485053] Document.refreshProjection()/.waitForDone() doesn't wait for transform masks to complete

Dmitry Kazakov bugzilla_noreply at kde.org
Mon Apr 8 12:29:33 BST 2024


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

Dmitry Kazakov <dimula73 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/krita/-/commit/d782198
                   |                            |63dc37ec7ddd5af6d051bc9cdbf
                   |                            |0c78fa

--- Comment #3 from Dmitry Kazakov <dimula73 at gmail.com> ---
Git commit d78219863dc37ec7ddd5af6d051bc9cdbf0c78fa by Dmitry Kazakov, on
behalf of Agata Cacko.
Committed on 08/04/2024 at 11:29.
Pushed by dkazakov into branch 'master'.

Fix waitForDone() not waiting for transform mask update

Before this commit, if you had a very slow transform mask in an image
and you used a script to enable it, then running waitForDone() wasn't
enough to ensure that the transform mask stopped updating before
running any other code.
This commit ensures that it does wait until all the updates are done.

Test file can be just a simple document with one transform mask attached to
a paint layer with a scribble. The transform mask should heavily use Liquify
transform, since it is the slowest one at the moment.

Steps to reproduce:
1. Create test file
2. Disable the transform mask (so there will be some updates)
3. Run the script

Example test script (use in Scripter):
(comes from the bug report)

'''
from krita import *

doc = Krita.instance().activeDocument()
doc.activeNode().setVisible(True)

 #doc.refreshProjection()
doc.activeNode().setBlendingMode(doc.activeNode().blendingMode())
doc.waitForDone()

try:
    doc.setBatchmode(True)
    exportParameters = InfoObject()
    exportParameters.setProperty("alpha", True)
    exportParameters.setProperty("compression", 6)  # 0-9
    exportParameters.setProperty("indexed", False)
    if not doc.exportImage('/path/to/file/test485053.png', exportParameters):
        dialog = QMessageBox()
        dialog.setText("Error exporting")
        dialog.exec()
finally:
    doc.setBatchmode(False)
'''

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

https://invent.kde.org/graphics/krita/-/commit/d78219863dc37ec7ddd5af6d051bc9cdbf0c78fa

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



More information about the kde-mac mailing list