From c6b06152c0cf3b340a13f9695c2d3c410b0dfef6 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 3 Jun 2020 18:38:35 +0200 Subject: [PATCH] QmlDesigner: Fix transition selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * We have to use adjustedWidth, because that one ignores the pen width changes for selection. * In case we render to an image we have to take care of the scaleFactor manually. Otherwise this is done by the cosmetic pen. Change-Id: I29877ebfabb1629a9eea756725f6dc3d8ec41247 Reviewed-by: Henning Gründl Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/formeditoritem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 46ba1839145..924538aa6fc 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -877,7 +877,7 @@ public: if (node.modelNode().isSelected()) width += 2; if (hitTest) - width = qMax(width * 8, 20.0); + width = width * 8 / scaleFactor; // color if (resolveConnection.isStartLine) color = QColor("blue"); @@ -1224,7 +1224,7 @@ public: const bool boolExitRight = fromRect.right() < toRect.center().x(); const bool boolExitBottom = fromRect.bottom() < toRect.center().y(); - const int padding = 2 * config.width + 2 * config.adjustedWidth; + const int padding = 4 * config.adjustedWidth; if (horizontalFirst) { const qreal startX = boolExitRight ? fromRect.right() + padding : fromRect.x() - padding;