Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix dependent resources to be updated on preset overwrite
Dmitry Kazakov955a56876b04
diff --git a/libs/image/brushengine/kis_paintop_preset.cpp b/libs/image/brushengine/kis_paintop_preset.cppindex e2d04cf316..8123a3eb02 100644--- a/libs/image/brushengine/kis_paintop_preset.cpp+++ b/libs/image/brushengine/kis_paintop_preset.cpp@@ -391,6 +391,8 @@ bool KisPaintOpPreset::saveToDevice(QIODevice *dev) const*/d->version = "5.0";+ const_cast<KisPaintOpPreset*>(this)->updateLinkedResourcesMetaData();+writer.setText("version", d->version);writer.setText("preset", doc.toString());@@ -403,7 +405,6 @@ bool KisPaintOpPreset::saveToDevice(QIODevice *dev) const}return writer.write(img);-}void KisPaintOpPreset::updateLinkedResourcesMetaData()@@ -433,6 +434,8 @@ void KisPaintOpPreset::updateLinkedResourcesMetaData()if (!resourceFileNames.isEmpty()) {addMetaData("dependent_resources_filenames", resourceFileNames);}+ } else {+ addMetaData("dependent_resources_filenames", QStringList());}}