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

Ensure new text-on-path path names are unique AND not empty.

Wolthera van Hövell tot Westerfliera42b1d262850
diff --git a/libs/flake/text/KoSvgTextShape_p.h b/libs/flake/text/KoSvgTextShape_p.h
index 10363c5045..66390e4119 100644
--- a/libs/flake/text/KoSvgTextShape_p.h
+++ b/libs/flake/text/KoSvgTextShape_p.h
@@ -1356,8 +1356,10 @@ public:
break;
}
}
- if (textPathNameUnique) {
+ if (textPathNameUnique && !newTextPathName.isEmpty()) {
textPath->setName(newTextPathName);
+ } else {
+ textPathNameUnique = false;
}
newTextPathName = QString("textPath"+QString::number(textPathNumber));
}