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)
|
void ChatLog::resizeEvent(QResizeEvent* ev)
|
||||||
{
|
{
|
||||||
|
bool stb = stickToBottom();
|
||||||
|
|
||||||
|
if(ev->size().width() != ev->oldSize().width())
|
||||||
|
{
|
||||||
startResizeWorker();
|
startResizeWorker();
|
||||||
|
stb = false; // let the resize worker handle it
|
||||||
|
}
|
||||||
|
|
||||||
QGraphicsView::resizeEvent(ev);
|
QGraphicsView::resizeEvent(ev);
|
||||||
|
|
||||||
|
if(stb)
|
||||||
|
scrollToBottom();
|
||||||
|
|
||||||
updateBusyNotification();
|
updateBusyNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user