From e786dc14227718ac8f85128c70f210ddb06c64f2 Mon Sep 17 00:00:00 2001 From: Kleber Date: Sat, 18 May 2024 13:19:12 -0300 Subject: [PATCH] Copy highlight state before setting + rebase --- src/widgets/Notebook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index 0350a1d7499..4bbc6148a39 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -195,10 +195,11 @@ void Notebook::duplicatePage(QWidget *page) newContainer->applyFromDescriptor(descriptor); int newTabPosition = this->indexOf(page) + 1; + auto highlightState = item->tab->highlightState(); auto *tab = this->addPageAt( newContainer, newTabPosition, item->tab->hasCustomTitle() ? item->tab->getCustomTitle() : "", false); - tab->setHighlightState(item->tab->highlightState()); + tab->setHighlightState(highlightState); newContainer->setTab(tab); }