summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugingui/scrollbar.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugingui/scrollbar.cc b/plugingui/scrollbar.cc
index 3fc3ac8..d48da1a 100644
--- a/plugingui/scrollbar.cc
+++ b/plugingui/scrollbar.cc
@@ -141,7 +141,9 @@ void GUI::ScrollBar::mouseMoveEvent(MouseMoveEvent *e)
int h = height() - 2 * width() - 3;
delta /= (float)h / (float)max;
- setValue(value_offset - delta);
+
+ int newval = value_offset - delta;
+ if(newval != value()) setValue(newval);
}
void GUI::ScrollBar::buttonEvent(ButtonEvent *e)