From 96ebc30b29f2497d909882ab4f9a344d11b6a41f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 7 Sep 2011 09:40:57 +0200 Subject: [PATCH] Fix missing repaint when disabling lookingglass effect --- effects/lookingglass/lookingglass.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/effects/lookingglass/lookingglass.cpp b/effects/lookingglass/lookingglass.cpp index 07739d0b25..1ad78266ad 100644 --- a/effects/lookingglass/lookingglass.cpp +++ b/effects/lookingglass/lookingglass.cpp @@ -161,8 +161,11 @@ void LookingGlassEffect::toggle() polling = false; effects->stopMousePolling(); } - m_enabled = false; + if (zoom == target_zoom) { + m_enabled = false; + } } + effects->addRepaint(cursorPos().x() - radius, cursorPos().y() - radius, 2 * radius, 2 * radius); } void LookingGlassEffect::zoomIn() @@ -181,11 +184,13 @@ void LookingGlassEffect::zoomOut() target_zoom -= 0.5; if (target_zoom < 1) { target_zoom = 1; - m_enabled = false; if (polling) { polling = false; effects->stopMousePolling(); } + if (zoom == target_zoom) { + m_enabled = false; + } } effects->addRepaint(cursorPos().x() - radius, cursorPos().y() - radius, 2 * radius, 2 * radius); }