[apps/round_cursor_view] Fix setCursorFrame

Scenario: create a cartesian function and a polar function, then
navigate between the 2. The cursor sometimes stays drawn somewhere it
shouldn't be.
This commit is contained in:
Léa Saviot
2019-09-10 10:47:32 +02:00
parent a72f42d75e
commit 4262ea0365

View File

@@ -55,11 +55,7 @@ void RoundCursorView::setCursorFrame(KDRect f) {
ctx->fillRectWithPixels(KDRect(0,0,k_cursorSize, k_cursorSize), m_underneathPixelBuffer, s_cursorWorkingBuffer);
// Set the frame
m_frame = f;
// Draw the cursor
KDPoint translation = f.origin().translatedBy(previousRelativeFrame.origin().opposite());
ctx->setOrigin(previousFrame.origin().translatedBy(translation));
ctx->setClippingRect(previousFrame.translatedBy(translation));
drawRect(ctx, f);
markRectAsDirty(bounds());
return;
}
#endif