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

            Bug ID: 425066
           Summary: Python Document.modified() flag is NOT set in edit
                    operations.
           Product: krita
           Version: nightly build (please specify the git hash!)
          Platform: Appimage
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: aki.rissa...@anima.fi
  Target Milestone: ---

SUMMARY:
Document modified flag is NOT set in edit operations.
Haven't tested all document edit methods.


STEPS TO REPRODUCE:

Krita -> Tools -> Scripts -> Scripter

```python
from krita import Krita

# before running
# open / save new document so that modified flag is false.

app = Krita.instance()
doc = app.activeDocument()

print(f"Krita version: {app.version()}")
print(f"before is_modified: {doc.modified()}")

doc.setDocumentInfo(doc.documentInfo() + "\n")
doc.setFramesPerSecond(int(doc.framesPerSecond() + 1))
doc.setFullClipRangeStartTime(doc.fullClipRangeStartTime() + 1)
doc.setFullClipRangeEndTime(doc.fullClipRangeEndTime() + 1)
doc.setFileName(doc.fileName() + ".ILBM")
doc.setName(doc.name()[::-1])

print(f"after is_modified: {doc.modified()}")
```

OBSERVED RESULT:
```
==== Warning: Script not saved! ====
Krita version: 4.3.1-alpha (git 4212182)
before is_modified: False
after is_modified: False
```

EXPECTED RESULT:
```
==== Warning: Script not saved! ====
Krita version: 4.3.1-alpha (git 4212182)
before is_modified: False
after is_modified: True
```

SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Linux (x86_64) release 4.15.0-106-generic
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.9

ADDITIONAL INFORMATION

Affects:
  - saving of document (no changes to save)
  - close krita (save modified? confirmation)

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

Reply via email to