[graphics/krita] libs/ui/canvas: Remove canvas code meant for handling the old text shapes
Boudewijn Rempt
null at kde.org
Wed Jul 1 14:19:32 BST 2020
Git commit 30b76f0a8e2c038e43d4a87f047e0b4402c55a11 by Boudewijn Rempt.
Committed on 01/07/2020 at 13:19.
Pushed by rempt into branch 'master'.
Remove canvas code meant for handling the old text shapes
And incidentally, now we probably know why the old text shape
sometimes rendered in a broken way, broken enough that we removed
it: it was rendered once again on top of the canvas _as_ well as
in the projection of the vector layer. If the alignment wasn't
perfect, you'd get those ghosted double-printed characters that
made the old textshape unusable.
We could't kept it after all, I fear...
CCMAIL:kimageshop at kde.org
M +0 -27 libs/ui/canvas/kis_canvas_widget_base.cpp
https://invent.kde.org/graphics/krita/commit/30b76f0a8e2c038e43d4a87f047e0b4402c55a11
diff --git a/libs/ui/canvas/kis_canvas_widget_base.cpp b/libs/ui/canvas/kis_canvas_widget_base.cpp
index 4a86defdc3..a9c8222109 100644
--- a/libs/ui/canvas/kis_canvas_widget_base.cpp
+++ b/libs/ui/canvas/kis_canvas_widget_base.cpp
@@ -111,36 +111,9 @@ void KisCanvasWidgetBase::drawDecorations(QPainter & gc, const QRect &updateWidg
gc.setClipRect(updateWidgetRect);
gc.setTransform(m_d->coordinatesConverter->documentToWidgetTransform());
-
// Paint the shapes (other than the layers)
m_d->canvas->globalShapeManager()->paint(gc, false);
- // draw green selection outlines around text shapes that are edited, so the user sees where they end
- gc.setPen( Qt::green );
- Q_FOREACH (KoShape *shape, canvas()->shapeManager()->selection()->selectedShapes()) {
- if (shape->shapeId() == "ArtisticText" || shape->shapeId() == "TextShapeID") {
- gc.save();
- gc.setTransform(shape->absoluteTransformation(), true);
- gc.drawRect(QRectF(QPointF(), shape->size()));
- gc.restore();
- }
- }
-
- // Draw text shape over canvas while editing it, that's needs to show the text selection correctly
- QString toolId = KoToolManager::instance()->activeToolId();
- if (toolId == "ArtisticTextTool" || toolId == "TextTool") {
- gc.save();
- gc.setTransform(m_d->coordinatesConverter->documentToWidgetTransform());
- gc.setPen(Qt::NoPen);
- gc.setBrush(Qt::NoBrush);
- Q_FOREACH (KoShape *shape, canvas()->shapeManager()->selection()->selectedShapes()) {
- if (shape->shapeId() == "ArtisticText" || shape->shapeId() == "TextShapeID") {
- KoShapePaintingContext paintContext(canvas(), false);
- KoShapeManager::renderSingleShape(shape, gc, paintContext);
- }
- }
- gc.restore();
- }
}
// ask the decorations to paint themselves
More information about the kimageshop
mailing list