| Summary: | off by one error in selection in layout mode | ||
|---|---|---|---|
| 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: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Matthew Truch
2006-04-11 01:33:25 UTC
A more specific problem I see is as follows: Create a plot Create a box within it Switch to layout mode Move the cursor to inside the box Slowly move the cursor outside of the box but remain within the plot RESULTS: For a short distance the cursor will be the standard arrow cursor EXPECTED RESULTS: The cursor should always be the move cursor (with the focus rectangles drawn to show which object has the focus) SVN commit 537517 by arwalker:
BUG:125328 Set the cursor correctly even when switching focus objects
M +11 -20 ksttoplevelview.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #537516:537517
@@ -210,33 +210,24 @@
}
}
if (p) {
- setCursorFor(pos, p);
if (p->focused()) {
+ setCursorFor(pos, p);
_focusOn = true; // just in case - seems to be false on occasion
return;
}
+ p->setFocus(true);
if (_focusOn) { // something else has the focus, clear it
- p->setFocus(true);
clearFocus();
- KstPainter painter;
- painter.begin(_w);
- painter.setRasterOp(Qt::NotROP);
- painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
- painter.setBrush(Qt::NoBrush);
- p->drawFocusRect(painter);
- painter.end();
- _focusOn = true;
- } else {
- p->setFocus(true);
- KstPainter painter;
- painter.begin(_w);
- painter.setRasterOp(Qt::NotROP);
- painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
- painter.setBrush(Qt::NoBrush);
- p->drawFocusRect(painter);
- painter.end();
- _focusOn = true;
}
+ setCursorFor(pos, p);
+ KstPainter painter;
+ painter.begin(_w);
+ painter.setRasterOp(Qt::NotROP);
+ painter.setPen(QPen(Qt::black, 0, Qt::SolidLine));
+ painter.setBrush(Qt::NoBrush);
+ p->drawFocusRect(painter);
+ painter.end();
+ _focusOn = true;
_hoverFocus = p;
} else {
clearFocus();
|