From 86fee7010cd728ce34ceb4a915e1b1809a1bec70 Mon Sep 17 00:00:00 2001 From: James LaChance Date: Wed, 28 Oct 2020 02:53:57 -0400 Subject: [PATCH] Hide the full utility panel instead of internal Previously only the internal panel was getting hidden, rather than the surrounding/containing QWidget. This created a bug that the Esc would need to be pressed more than once to exit the text tool or flameshot. Fixes #1108 --- src/widgets/panel/utilitypanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/panel/utilitypanel.cpp b/src/widgets/panel/utilitypanel.cpp index 28f5b80d..12ef5eae 100644 --- a/src/widgets/panel/utilitypanel.cpp +++ b/src/widgets/panel/utilitypanel.cpp @@ -42,6 +42,8 @@ UtilityPanel::UtilityPanel(QWidget* parent) &QPropertyAnimation::finished, m_internalPanel, &QWidget::hide); + + hide(); } QWidget* UtilityPanel::toolWidget() const @@ -127,7 +129,6 @@ void UtilityPanel::initInternalPanel() bgColor.setAlphaF(0.0); m_internalPanel->setStyleSheet( QStringLiteral("QScrollArea {background-color: %1}").arg(bgColor.name())); - m_internalPanel->hide(); m_hide = new QPushButton(); m_hide->setText(tr("Hide"));