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

Allow KoShapeQtQuickLabel to be emptied if it contained shapes before.

Wolthera van Hövell tot Westerflier22b759ae4682
diff --git a/plugins/dockers/textproperties/KoShapeQtQuickLabel.cpp b/plugins/dockers/textproperties/KoShapeQtQuickLabel.cpp
index caac0ce0e7..7772b007cc 100644
--- a/plugins/dockers/textproperties/KoShapeQtQuickLabel.cpp
+++ b/plugins/dockers/textproperties/KoShapeQtQuickLabel.cpp
@@ -131,17 +131,17 @@ void KoShapeQtQuickLabel::setSvgData(const QString &newSvgData)
p.setResolution(bb, 72);
QList<KoShape*> shapes = p.parseSvg(doc.documentElement(), &sz);
- if (shapes.isEmpty()) return;
// TODO: Evaluate if this can't be faster.
d->shapePainter.reset(new KoShapePainter());
- if (d->shapes.isEmpty()) {
+ if (!d->shapes.isEmpty()) {
qDeleteAll(d->shapes);
}
d->shapes = shapes;
d->shapePainter->setShapes(d->shapes);
+
updateShapes();
emit svgDataChanged();