| Summary: | Arrows only go to the right | ||
|---|---|---|---|
| Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
| Component: | general | Assignee: | kst |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.x | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Matthew Truch
2005-12-15 05:38:01 UTC
On Wednesday 14 December 2005 23:38, Matthew Truch wrote:
> It is impossible to draw an arrow that points to the left.
Known issue, but not entirely true. In fixing the mouse handling I had to
break this. It's possible to rotate the arrow after it's drawn and given
that we have so many other issues to solve for 1.2, I think we'll leave this
for 1.2.1.
SVN commit 489017 by arwalker:
BUG:118363 Allow arrows to be created in any orientation
M +13 -5 kstgfxmousehandlerutils.cpp
--- trunk/extragear/graphics/kst/kst/kstgfxmousehandlerutils.cpp #489016:489017
@@ -73,13 +73,21 @@
}
}
}
- bool topLeft = (mouseOrigin.x() <= fakePos.x() && mouseOrigin.y() <= fakePos.y()) || (mouseOrigin.x() >= fakePos.x() && mouseOrigin.y() >= fakePos.y());
+
QRect lineRect(mouseOrigin, fakePos);
- QRect reduced = lineRect.normalize().intersect(boundingBox);
- if (topLeft) {
- return reduced;
+ QRect reduced = lineRect.normalize().intersect(boundingBox);
+
+ lineRect = reduced;
+ if (mouseOrigin.x() > fakePos.x()) {
+ lineRect.setLeft(reduced.right());
+ lineRect.setRight(reduced.left());
}
- return QRect(reduced.bottomLeft(), reduced.topRight());
+ if (mouseOrigin.y() > fakePos.y()) {
+ lineRect.setTop(reduced.bottom());
+ lineRect.setBottom(reduced.top());
+ }
+
+ return lineRect;
}
|