From 633084ed9cdfeb35ad2ceb5f1b2cb209e9f15d00 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 16 Jul 2019 11:09:48 +0300 Subject: [PATCH] Fixed position of already shown tabbed panel. - Fixed #6301. --- Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp index 8f661eb1c..897be1926 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp @@ -106,9 +106,15 @@ TabbedPanel::TabbedPanel( } void TabbedPanel::moveBottomRight(int bottom, int right) { + const auto isNew = (_bottom != bottom || _right != right); _bottom = bottom; _right = right; - updateContentHeight(); + // If the panel is already shown, update the position. + if (!isHidden() && isNew) { + moveByBottom(); + } else { + updateContentHeight(); + } } void TabbedPanel::setDesiredHeightValues(