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

            Bug ID: 447807
           Summary: Document.refreshProjection() does not refresh for Fill
                    Layers
           Product: krita
           Version: 5.0.0
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: jung...@hotmail.com
  Target Milestone: ---

SUMMARY
When using the Python Scripting to modify parameters for a Fill Layer, the fill
layer does not update after calling refreshProjection().

STEPS TO REPRODUCE
1.  Create a new document.
2.  Create a new Fill Layer. Choose any color except green (because my example
script will try to make it green)
3.  Run the following script:

###### SCRIPT START ######
from krita import *
import xml.etree.ElementTree as ET

activeDoc = Krita.instance().activeDocument()
node = activeDoc.nodeByName("Fill Layer 1")
config = node.filterConfig()
properties = config.properties()
xmlObj = ET.fromstring(properties["color"])
xmlObj[0].set("r", "0.00")
xmlObj[0].set("g", "1.00")
xmlObj[0].set("b", "0.00")
result = ET.tostring(xmlObj, encoding="unicode")
properties["color"] = result
config.setProperty("color", properties["color"])
node.setGenerator("color", config)
activeDoc.refreshProjection()
###### SCRIPT END ######

OBSERVED RESULT
The Fill Layer remains the old color. It will update correctly if you right
click the layer and go to "Properties".

EXPECTED RESULT
The Fill Layer color change should be reflected on the canvas.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.12

ADDITIONAL INFORMATION
I have reproduced this issue on 2 different machines:
- Core i9 Desktop on Windows 10
- Core i7 Wacom MobileStudio Pro on Windows 10

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

Reply via email to