From 8bb4d31409ad8aa377a4def4f5ad7dae3e011c73 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 11 May 2017 19:11:08 +0300 Subject: [PATCH] Fix crash in HistoryWidget::mousePressEvent. When the mouse was over edit / reply and the history was closed, mouse click handler still tried to jump to the message. Now we update the mouse over state each time the history changes. --- Telegram/SourceFiles/historywidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index f145abd63..908d7ab5b 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -1826,6 +1826,8 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re doneShow(); } + updateOverStates(mapFromGlobal(QCursor::pos())); + if (App::wnd()) QTimer::singleShot(0, App::wnd(), SLOT(setInnerFocus())); App::main()->dlgUpdated(wasHistory ? wasHistory->peer : nullptr, wasMsgId);