From 4262ea0365710da53d38875a014f78d7fd653cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 10 Sep 2019 10:47:32 +0200 Subject: [PATCH] [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. --- apps/shared/round_cursor_view.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/shared/round_cursor_view.cpp b/apps/shared/round_cursor_view.cpp index a35bd7f08..8de83bbaf 100644 --- a/apps/shared/round_cursor_view.cpp +++ b/apps/shared/round_cursor_view.cpp @@ -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