From f982938919a68598b5196a3753d4417019b02062 Mon Sep 17 00:00:00 2001 From: Stefan Merettig Date: Sat, 4 Apr 2015 23:06:06 +0200 Subject: [PATCH] Screen grabber: Hide the flyout when the chat form is hidden. --- src/widget/form/chatform.cpp | 4 +++- src/widget/form/genericchatform.cpp | 6 ++++++ src/widget/form/genericchatform.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index d74067bb5..809156ff3 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -985,10 +985,12 @@ void ChatForm::show(Ui::MainWindow &ui) callConfirm->show(); } -void ChatForm::hideEvent(QHideEvent*) +void ChatForm::hideEvent(QHideEvent* event) { if (callConfirm) callConfirm->hide(); + + GenericChatForm::hideEvent(event); } OfflineMsgEngine *ChatForm::getOfflineMsgEngine() diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index c7adcf338..bba23332f 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -410,6 +410,12 @@ void GenericChatForm::insertChatMessage(ChatMessage::Ptr msg) chatWidget->insertChatlineAtBottom(std::dynamic_pointer_cast(msg)); } +void GenericChatForm::hideEvent(QHideEvent* event) +{ + hideFileMenu(); + QWidget::hideEvent(event); +} + bool GenericChatForm::eventFilter(QObject* object, QEvent* event) { if (object != this->fileButton && object != this->fileFlyout) diff --git a/src/widget/form/genericchatform.h b/src/widget/form/genericchatform.h index 21246c83d..831aee68d 100644 --- a/src/widget/form/genericchatform.h +++ b/src/widget/form/genericchatform.h @@ -84,6 +84,7 @@ protected slots: protected: QString resolveToxID(const ToxID &id); void insertChatMessage(ChatMessage::Ptr msg); + void hideEvent(QHideEvent* event); ToxID previousId; QDateTime prevMsgDateTime;