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

Disallow non-KoPathShapes as contour shapes.

Wolthera van Hövell tot Westerflierb908184bccf0
diff --git a/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp b/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp
index 8256e2b01a..654fb787f8 100644
--- a/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp
+++ b/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp
@@ -573,7 +573,7 @@ void DefaultTool::slotAddShapesToFlow()
KoSvgTextShape *text = dynamic_cast<KoSvgTextShape*>(shape);
if (text && !textShape) {
textShape = text;
- } else {
+ } else if (dynamic_cast<KoPathShape*>(shape)) {
shapes.append(shape);
}
}
@@ -658,7 +658,7 @@ void DefaultTool::slotSubtractShapesFromFlow()
KoSvgTextShape *text = dynamic_cast<KoSvgTextShape*>(shape);
if (text && !textShape) {
textShape = text;
- } else {
+ } else if (dynamic_cast<KoPathShape*>(shape)) {
shapes.append(shape);
}
}