Skip to content

Commit

Permalink
Fix crash in HistoryWidget::mousePressEvent.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
john-preston committed May 11, 2017
1 parent 0557eed commit 8bb4d31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/historywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8bb4d31

Please sign in to comment.