[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
This commit is contained in:
Adriaan de Groot 2021-04-02 15:51:24 +02:00
parent b191f39bdf
commit 18b805d43f

View File

@ -210,6 +210,10 @@ Config::Config( QObject* parent )
m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); m_setxkbmapTimer.start( QApplication::keyboardInputInterval() );
emit prettyStatusChanged(); 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* KeyboardModelsModel*