QmlDesigner: Fix transition selection

* 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 <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-06-03 18:38:35 +02:00
parent d30081ba39
commit c6b06152c0

View File

@@ -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;