Fix possible stack overflow crash.
This commit is contained in:
parent
dbc0e87c80
commit
9ebfd80b29
1 changed files with 2 additions and 4 deletions
|
|
@ -254,6 +254,7 @@ void ScrollBar::mousePressEvent(QMouseEvent *e) {
|
|||
if (!width() || !height()) return;
|
||||
|
||||
_dragStart = e->globalPos();
|
||||
area()->setMovingByScrollBar(true);
|
||||
setMoving(true);
|
||||
if (_overbar) {
|
||||
_startFrom = _connected->value();
|
||||
|
|
@ -265,15 +266,12 @@ void ScrollBar::mousePressEvent(QMouseEvent *e) {
|
|||
_connected->setValue(_startFrom);
|
||||
setOverBar(true);
|
||||
}
|
||||
|
||||
area()->setMovingByScrollBar(true);
|
||||
}
|
||||
|
||||
void ScrollBar::mouseReleaseEvent(QMouseEvent *e) {
|
||||
if (_moving) {
|
||||
setMoving(false);
|
||||
|
||||
area()->setMovingByScrollBar(false);
|
||||
setMoving(false);
|
||||
}
|
||||
if (!_over) {
|
||||
setMouseTracking(false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue