Commit db24b6d6 authored by Tusooa Zhu's avatar Tusooa Zhu 🅱

Port line tool to the new strokes

parent e4f74f1c
......@@ -43,6 +43,7 @@
#include "kis_painting_information_builder.h"
#include "kis_tool_line_helper.h"
#include <../../opt/krita/src/libs/flake/KoCanvasStrokeHelperBase.h>
const KisCoordinatesConverter* getCoordinatesConverter(KoCanvasBase * canvas)
{
......@@ -288,8 +289,11 @@ void KisToolLine::endStroke()
KoShapeStrokeSP border(new KoShapeStroke(currentStrokeWidth(), currentFgColor().toQColor()));
path->setStroke(border);
KUndo2Command * cmd = canvas()->shapeController()->addShape(path, 0, 0);
canvas()->addCommand(cmd);
canvas()->strokeHelper()->run(kundo2_i18n("Create shape (new)"),
[this, path]() {
canvas()->shapeController()->addShape(path, 0);
return true;
});
}
m_strokeIsRunning = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment