From 18b805d43f4bd1a48a22bc6d87a932035b0e3343 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 15:51:24 +0200 Subject: [PATCH] [keyboard] Set initial values for model, layout, variant When loading the lists, no initial string-value was being set for the model, layout and variant; the configuration could pass right through and pick up empty strings instead. If the user does not change the model, the UI would show "pc105" but the internal setting would still be empty. FIXES #1668 --- src/modules/keyboard/Config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 5140021ef..d286e26fd 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -210,6 +210,10 @@ Config::Config( QObject* parent ) m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); emit prettyStatusChanged(); } ); + + m_selectedModel = m_keyboardModelsModel->key( m_keyboardModelsModel->currentIndex() ); + m_selectedLayout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).first; + m_selectedVariant = m_keyboardVariantsModel->key( m_keyboardVariantsModel->currentIndex() ); } KeyboardModelsModel*