From 92c0a68a1971f73fd444b714c5f43f96815e4cba Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 21 Mar 2020 13:33:53 +0200 Subject: [PATCH] update active states differently for singlelayout --- app/settings/models/layoutsmodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/settings/models/layoutsmodel.cpp b/app/settings/models/layoutsmodel.cpp index f39086764..92d3feeaa 100644 --- a/app/settings/models/layoutsmodel.cpp +++ b/app/settings/models/layoutsmodel.cpp @@ -58,6 +58,7 @@ Layouts::Layouts(QObject *parent, Latte::Corona *corona) emit dataChanged(index(0, NAMECOLUMN), index(rowCount()-1, SHAREDCOLUMN), roles); }); + connect(this, &Layouts::inMultipleModeChanged, this, &Layouts::updateActiveStates); connect(m_corona->layoutsManager(), &Latte::Layouts::Manager::currentLayoutNameChanged, this, &Layouts::updateActiveStates); connect(m_corona->layoutsManager(), &Latte::Layouts::Manager::centralLayoutsChanged, this, &Layouts::updateActiveStates); @@ -834,7 +835,8 @@ void Layouts::updateActiveStates() for(int i=0; ilayoutsManager()->synchronizer()->layout(m_layoutsTable[i].name)) { + if (m_inMultipleMode && m_corona->layoutsManager()->synchronizer()->layout(m_layoutsTable[i].name) + || (!m_inMultipleMode && o_layoutsTable[i].name == m_corona->layoutsManager()->synchronizer()->currentLayoutName())) { iActive = true; }