From bc5a03af26fe3b60869cd247dc7e59060c97e619 Mon Sep 17 00:00:00 2001 From: kornes <28986062+kornes@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:19:09 +0000 Subject: [PATCH] Fix tab direction change crash (#4248) * Fix tab direction change crash * changelog * Update CHANGELOG.md Co-authored-by: pajlada Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/widgets/Window.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 148c2151..86424a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Bugfix: Fixed message input showing as red after removing a message that was more than 500 characters. (#4204) - Bugfix: Fixed unnecessary saving of windows layout. (#4201) - Bugfix: Fixed Reply window missing selection clear behaviour between chat and input box. (#4218) +- Bugfix: Fixed crash that could occur when changing Tab layout and utilizing multiple windows. (#4248) - Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198) ## 2.4.0 diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index 818d0311..fa3cb6f5 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -80,9 +80,11 @@ Window::Window(WindowType type, QWidget *parent) }); if (type == WindowType::Main || type == WindowType::Popup) { - getSettings()->tabDirection.connect([this](int val) { - this->notebook_->setTabLocation(NotebookTabLocation(val)); - }); + getSettings()->tabDirection.connect( + [this](int val) { + this->notebook_->setTabLocation(NotebookTabLocation(val)); + }, + this->signalHolder_); } }