From 6d0dbebda9e905162d3a672246f003aed2092444 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 20 Sep 2017 13:51:45 +0300 Subject: [PATCH] Fix tabbed selector section / panel exchange. --- Telegram/SourceFiles/history/history_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 8581425ec..0bbd73bf1 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3771,17 +3771,18 @@ void HistoryWidget::pushTabbedSelectorToThirdSection() { &st::historyRecordVoiceFgActive, &st::historyRecordVoiceRippleBgActive); auto destroyingPanel = std::move(_tabbedPanel); - controller()->resizeForThirdSection(); auto memento = ChatHelpers::TabbedMemento( destroyingPanel->takeSelector(), base::lambda_guarded(this, [this]( object_ptr selector) { returnTabbedSelector(std::move(selector)); })); + controller()->resizeForThirdSection(); controller()->showSection( std::move(memento), anim::type::instant, anim::activation::background); + destroyingPanel.destroy(); } void HistoryWidget::pushInfoToThirdSection() { @@ -3819,6 +3820,7 @@ void HistoryWidget::returnTabbedSelector( _tabbedSelectorToggle->installEventFilter(_tabbedPanel); _tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr); _tabbedSelectorToggleTooltipShown = false; + moveFieldControls(); } void HistoryWidget::recountChatWidth() {