Skip to content
Snippets Groups Projects
Commit 6a843087 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[keyboard] Preserve original settings for cancel()

parent 4de8f5c8
No related branches found
No related tags found
No related merge requests found
......@@ -571,11 +571,26 @@ Config::detectCurrentKeyboardLayout()
break;
}
}
// The models have updated the m_current settings, copy them
m_original = m_current;
}
void
Config::cancel()
{
const auto extra = getAdditionalLayoutInfo( m_original.selectedLayout );
if ( m_configureXkb )
{
applyXkb( m_original, m_additionalLayoutInfo );
}
if ( m_configureLocale1 )
{
applyLocale1( m_original, m_additionalLayoutInfo );
}
if ( m_configureKWin )
{
applyKWin( m_original, m_additionalLayoutInfo );
}
}
QString
......
......@@ -107,6 +107,7 @@ private:
KeyboardGroupsSwitchersModel* m_KeyboardGroupSwitcherModel;
BasicLayoutInfo m_current;
BasicLayoutInfo m_original;
// Layout (and corresponding info) added if current one doesn't support ASCII (e.g. Russian or Japanese)
AdditionalLayoutInfo m_additionalLayoutInfo;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment