Commit 09ac9994 authored by luz's avatar luz

ButtonBehaviour: made sure fixedButtonMode buttons don't load invalid mode...

ButtonBehaviour: made sure fixedButtonMode buttons don't load invalid mode from old settings (but autocorrect the mode)
parent ba463b2f
......@@ -418,6 +418,10 @@ void ButtonBehaviour::loadFromRow(sqlite3pp::query::iterator &aRow, int &aIndex,
// get the fields
buttonGroup = (DsGroup)aRow->get<int>(aIndex++);
buttonMode = (DsButtonMode)aRow->get<int>(aIndex++);
if (buttonMode!=buttonMode_inactive && fixedButtonMode!=buttonMode_inactive && buttonMode!=fixedButtonMode) {
// force mode according to fixedButtonMode, even if settings (from older versions) say something different
buttonMode = fixedButtonMode;
}
buttonFunc = (DsButtonFunc)aRow->get<int>(aIndex++);
uint64_t flags = aRow->get<int>(aIndex++);
buttonChannel = (DsChannelType)aRow->get<int>(aIndex++);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment