mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
ChatLog: don't start the resize worker if the width doesn't change
This commit is contained in:
parent
e4c52e6118
commit
bc21af4fa2
|
@ -614,9 +614,19 @@ void ChatLog::scrollContentsBy(int dx, int dy)
|
|||
|
||||
void ChatLog::resizeEvent(QResizeEvent* ev)
|
||||
{
|
||||
startResizeWorker();
|
||||
bool stb = stickToBottom();
|
||||
|
||||
if(ev->size().width() != ev->oldSize().width())
|
||||
{
|
||||
startResizeWorker();
|
||||
stb = false; // let the resize worker handle it
|
||||
}
|
||||
|
||||
QGraphicsView::resizeEvent(ev);
|
||||
|
||||
if(stb)
|
||||
scrollToBottom();
|
||||
|
||||
updateBusyNotification();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user