From 0737b16c6bd47e347efc3cbde609e49b4e672410 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 26 Dec 2015 21:09:00 +0100 Subject: [PATCH] CPersonalizeGui: try to fix wrong active mode after changed settings By treating of notifier methods or generally changed personalization settings of items, the values of "active" and "current_active" may differ and although that could be active = true, current_active = false, or vice versa. After restart of neutrino it would not conspicuous because activ and current_active will be equated. Otherwise it can happen, the modified items could be displayed in wrong mode at runtime. This try should fix this by writing the values from the current settings into the current_active variable. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4875f81491f2eb1d462e8f164a079f9febe96733 Author: Thilo Graf Date: 2015-12-26 (Sat, 26 Dec 2015) --- src/gui/personalize.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 0e82548ca..ff36b8ef7 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -976,6 +976,9 @@ void CPersonalizeGui::addPersonalizedItems() sigc::slot0 sl = sigc::bind<0>(sigc::mem_fun1(v_item[i].menuItem, &CMenuForwarder::disableByCondition), v_item[i].condition); v_item[i].menuItem->OnPaintItem.connect(sl); v_item[i].default_selected = false; + + //value of current_active for personalized item must have value of current settings state here! + v_item[i].menuItem->current_active = (p_mode || i_mode); } //add item if it's set to visible or pin protected and allow to add an forwarder as next