Skip to content

Commit

Permalink
fix: ask page can't scroll bottom
Browse files Browse the repository at this point in the history
Log: bug fix
Change-Id: I3b9532074a47b736df7be7e79ed5626b8dff364d
  • Loading branch information
deepin-mozart committed Nov 17, 2023
1 parent 5a85d70 commit 0a68561
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/plugins/codegeex/widgets/askpagewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ void AskPageWidget::onMessageUpdate(const MessageData &msgData)
msgComponents.value(msgData.messageID())->updateMessage(msgData);
}

if (scrollArea->verticalScrollBar()->isVisible()) {
int maxValue = scrollArea->verticalScrollBar()->maximum();
scrollArea->verticalScrollBar()->setValue(maxValue);
}
QTimer::singleShot(100, [this](){
if (scrollArea->verticalScrollBar()->isVisible()) {
int maxValue = scrollArea->verticalScrollBar()->maximum();
scrollArea->verticalScrollBar()->setValue(maxValue);
}
});
}

void AskPageWidget::onSendBtnClicked()
Expand Down

0 comments on commit 0a68561

Please sign in to comment.