Since the slider's handleMouseMoved() clips the new value, there's no need to

test if X >= 0. Dragging the slider quickly, we may never get an event where X
is exactly 0, so all it does is to make it more difficult to drag the slider to
its minimum value.

svn-id: r23330
This commit is contained in:
Torbjörn Andersson 2006-06-28 04:52:48 +00:00
parent 9767fa5aac
commit c367dbfc36

View File

@ -265,7 +265,7 @@ SliderWidget::SliderWidget(GuiObject *boss, const String &name, uint32 cmd)
}
void SliderWidget::handleMouseMoved(int x, int y, int button) {
if (isEnabled() && _isDragging && x >= 0) {
if (isEnabled() && _isDragging) {
int newValue = posToValue(x);
if (newValue < _valueMin)
newValue = _valueMin;