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++
CloseMerge KoPathShapes created in Knife Tool
Agata Cackob7e0175cc38f
diff --git a/plugins/tools/tool_knife/CutThroughShapeStrategy.cpp b/plugins/tools/tool_knife/CutThroughShapeStrategy.cppindex 8416a741ef..7946373e0f 100644--- a/plugins/tools/tool_knife/CutThroughShapeStrategy.cpp+++ b/plugins/tools/tool_knife/CutThroughShapeStrategy.cpp@@ -278,6 +278,7 @@ void CutThroughShapeStrategy::finishInteraction(Qt::KeyboardModifiers modifiers)// "sane" linearization instead of a very blocky appearancepath = booleanWorkaroundTransformInverted.map(path);QScopedPointer<KoPathShape> shape = QScopedPointer<KoPathShape>(KoPathShape::createShapeFromPainterPath(path));+ shape->closeMerge();if (shape->boundingRect().isEmpty()) {continue;diff --git a/plugins/tools/tool_knife/RemoveGutterStrategy.cpp b/plugins/tools/tool_knife/RemoveGutterStrategy.cppindex e29937ccda..c37c2b27e8 100644--- a/plugins/tools/tool_knife/RemoveGutterStrategy.cpp+++ b/plugins/tools/tool_knife/RemoveGutterStrategy.cpp@@ -271,6 +271,7 @@ void RemoveGutterStrategy::finishInteraction(Qt::KeyboardModifiers modifiers)result = booleanWorkaroundTransform.inverted().map(result);KoPathShape* resultShape = KoPathShape::createShapeFromPainterPath(result);+ resultShape->closeMerge();if (resultShape->boundingRect().isEmpty()) {return;