fixed selections moving when new messages come in while selecting

This commit is contained in:
fourtf
2018-05-17 12:16:13 +02:00
parent 8ee0f85a2b
commit d24e1f8314
7 changed files with 112 additions and 32 deletions
+2 -2
View File
@@ -109,14 +109,14 @@ void Scrollbar::setDesiredValue(qreal value, bool animated)
// }
this->currentValueAnimation.setEndValue(value);
this->smoothScrollingOffset = 0;
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.01;
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.0001;
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;
this->atBottom = ((this->getMaximum() - this->getLargeChange()) - value) <= 0.0001;
setCurrentValue(value);
}
}