Fix missing repaint when disabling lookingglass effect
This commit is contained in:
parent
4ed28ed2b0
commit
96ebc30b29
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue