Commit 6fd50444 authored by Sven Langkamp's avatar Sven Langkamp
Browse files

keep aspect ration when inserting artistic text with the text tool

BUG:305323
parent b8789329
......@@ -55,6 +55,11 @@ void KisToolText::finishRect(const QRectF &rect)
if (textFactory) {
KoShape* shape = textFactory->createDefaultShape(canvas()->shapeController()->resourceManager());
shape->setPosition(rect.topLeft());
// If the shape is an artistic shape we keep the aspect ration so the text isn't streched
if (shapeString == "ArtisticText") {
qreal ratio = rect.height()/shape->size().height();
r.setWidth(shape->size().width()*ratio);
}
shape->setSize(r.size());
addShape(shape);
......
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