Skip to content

armgit / krita

Public Imported from GitHub
0

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++

Test shapes in KoShapeMergeTextPropertiesCommand unordered.

Wolthera van Hövell tot Westerflierb5c2df7cf544
diff --git a/libs/flake/commands/KoShapeMergeTextPropertiesCommand.cpp b/libs/flake/commands/KoShapeMergeTextPropertiesCommand.cpp
index a4190467c6..a88068a181 100644
--- a/libs/flake/commands/KoShapeMergeTextPropertiesCommand.cpp
+++ b/libs/flake/commands/KoShapeMergeTextPropertiesCommand.cpp
@@ -8,6 +8,7 @@
#include <KoSvgTextShape.h>
#include <KoSvgTextProperties.h>
#include <kis_command_ids.h>
+#include <krita_container_utils.h>
struct KoShapeMergeTextPropertiesCommand::Private {
Private(const QList<KoShape*> &list) : shapes(list) { }
@@ -50,6 +51,7 @@ void KoShapeMergeTextPropertiesCommand::undo()
shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
}
}
+ d->mementos.clear();
}
int KoShapeMergeTextPropertiesCommand::id() const
@@ -61,7 +63,7 @@ bool KoShapeMergeTextPropertiesCommand::mergeWith(const KUndo2Command *other)
{
const KoShapeMergeTextPropertiesCommand *command = dynamic_cast<const KoShapeMergeTextPropertiesCommand*>(other);
- if (!command || command->d->shapes != d->shapes) {
+ if (!command || !KritaUtils::compareListsUnordered(command->d->shapes, d->shapes)) {
return false;
}