fixed "jump to bottom" now disapearing after click

This commit is contained in:
fourtf
2017-12-26 17:15:23 +01:00
parent a51735baae
commit 285c72a83d
2 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -130,19 +130,19 @@ void ScrollBar::setDesiredValue(qreal value, bool animated)
// }
this->currentValueAnimation.setEndValue(value);
this->smoothScrollingOffset = 0;
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
this->currentValueAnimation.start();
} else {
if (this->currentValueAnimation.state() != QPropertyAnimation::Running) {
this->smoothScrollingOffset = 0;
this->desiredValue = value;
this->currentValueAnimation.stop();
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
setCurrentValue(value);
}
}
}
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
this->smoothScrollingOffset = 0;
this->desiredValue = value;
}