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 assert when toggling Edit on a colorize mask after Update
Alexandre Moraisde9efc068519
diff --git a/libs/image/commands/kis_node_property_list_command.cpp b/libs/image/commands/kis_node_property_list_command.cppindex 0dc63834ee..e6fec167e0 100644--- a/libs/image/commands/kis_node_property_list_command.cpp+++ b/libs/image/commands/kis_node_property_list_command.cpp@@ -115,9 +115,12 @@ bool KisNodePropertyListCommand::mergeWith(const KUndo2Command *command)const QSet<QString> changedInTheMeantime =changedProperties(m_newPropertyList, other->m_oldPropertyList);- KIS_SAFE_ASSERT_RECOVER_NOOP(changedInTheMeantime.isEmpty() ||- (changedInTheMeantime.size() == 1 &&- *changedInTheMeantime.begin() == KisLayerPropertiesIcons::colorOverlay.id()));+ // stateless properties change without an undo command, so they may differ between two mergeable commands+ bool onlyStatelessChanged = true;+ Q_FOREACH (const QString &id, changedInTheMeantime) {+ onlyStatelessChanged &= KisLayerPropertiesIcons::isStatelessProperty(id);+ }+ KIS_SAFE_ASSERT_RECOVER_NOOP(onlyStatelessChanged);m_newPropertyList = other->m_newPropertyList;return true;