mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix empty page added when showing OOB dialog (#4849)
This commit is contained in:
parent
ad8f960a8e
commit
2fc7fdd91a
|
@ -16,6 +16,7 @@
|
||||||
- Bugfix: Fixed input in reply thread popup losing focus when dragging. (#4815)
|
- Bugfix: Fixed input in reply thread popup losing focus when dragging. (#4815)
|
||||||
- Bugfix: Fixed the Quick Switcher (CTRL+K) from sometimes showing up on the wrong window. (#4819)
|
- Bugfix: Fixed the Quick Switcher (CTRL+K) from sometimes showing up on the wrong window. (#4819)
|
||||||
- Bugfix: Fixed too much text being copied when copying chat messages. (#4812, #4830, #4839)
|
- Bugfix: Fixed too much text being copied when copying chat messages. (#4812, #4830, #4839)
|
||||||
|
- Bugfix: Fixed empty page being added when showing out of bounds dialog. (#4849)
|
||||||
- Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791)
|
- Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791)
|
||||||
- Dev: Temporarily disable High DPI scaling on Qt6 builds on Windows. (#4767)
|
- Dev: Temporarily disable High DPI scaling on Qt6 builds on Windows. (#4767)
|
||||||
- Dev: Tests now run on Ubuntu 22.04 instead of 20.04 to loosen C++ restrictions in tests. (#4774)
|
- Dev: Tests now run on Ubuntu 22.04 instead of 20.04 to loosen C++ restrictions in tests. (#4774)
|
||||||
|
|
|
@ -1439,6 +1439,11 @@ SplitContainer *SplitNotebook::getOrAddSelectedPage()
|
||||||
return this->addPage();
|
return this->addPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplitContainer *SplitNotebook::getSelectedPage()
|
||||||
|
{
|
||||||
|
return dynamic_cast<SplitContainer *>(Notebook::getSelectedPage());
|
||||||
|
}
|
||||||
|
|
||||||
void SplitNotebook::select(QWidget *page, bool focusPage)
|
void SplitNotebook::select(QWidget *page, bool focusPage)
|
||||||
{
|
{
|
||||||
// If there's a previously selected page, go through its splits and
|
// If there's a previously selected page, go through its splits and
|
||||||
|
|
|
@ -209,6 +209,8 @@ public:
|
||||||
|
|
||||||
SplitContainer *addPage(bool select = false);
|
SplitContainer *addPage(bool select = false);
|
||||||
SplitContainer *getOrAddSelectedPage();
|
SplitContainer *getOrAddSelectedPage();
|
||||||
|
/// Returns `nullptr` when no page is selected.
|
||||||
|
SplitContainer *getSelectedPage();
|
||||||
void select(QWidget *page, bool focusPage = true) override;
|
void select(QWidget *page, bool focusPage = true) override;
|
||||||
void themeChangedEvent() override;
|
void themeChangedEvent() override;
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ bool Window::event(QEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
case QEvent::WindowDeactivate: {
|
case QEvent::WindowDeactivate: {
|
||||||
auto page = this->notebook_->getOrAddSelectedPage();
|
auto *page = this->notebook_->getSelectedPage();
|
||||||
|
|
||||||
if (page != nullptr)
|
if (page != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -119,12 +119,8 @@ bool Window::event(QEvent *event)
|
||||||
{
|
{
|
||||||
split->updateLastReadMessage();
|
split->updateLastReadMessage();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (SplitContainer *container =
|
page->hideResizeHandles();
|
||||||
dynamic_cast<SplitContainer *>(page))
|
|
||||||
{
|
|
||||||
container->hideResizeHandles();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue