From 0b0fdb4ba2dc31455afe3bf5bd1a7449c8b00414 Mon Sep 17 00:00:00 2001 From: mmb L Date: Sun, 5 Jul 2020 20:07:03 +0800 Subject: [PATCH] Fix emote popup remember last position by moving setStayInScreenRect into EmotePopup constructor (#1752) --- src/widgets/dialogs/EmotePopup.cpp | 1 + src/widgets/splits/SplitInput.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dialogs/EmotePopup.cpp b/src/widgets/dialogs/EmotePopup.cpp index 8126830cc..125ebf612 100644 --- a/src/widgets/dialogs/EmotePopup.cpp +++ b/src/widgets/dialogs/EmotePopup.cpp @@ -114,6 +114,7 @@ namespace { EmotePopup::EmotePopup(QWidget *parent) : BasePopup(BaseWindow::EnableCustomFrame, parent) { + this->setStayInScreenRect(true); this->moveTo(this, getApp()->windows->emotePopupPos(), false); auto layout = new QVBoxLayout(this); diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 8e4aa0fd7..ecba0edf0 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -155,7 +155,6 @@ void SplitInput::openEmotePopup() if (!this->emotePopup_) { this->emotePopup_ = new EmotePopup(this); - this->emotePopup_->setStayInScreenRect(true); this->emotePopup_->setAttribute(Qt::WA_DeleteOnClose); this->emotePopup_->linkClicked.connect([this](const Link &link) {