From f1f5b6c1bb414bc993a7747dcd40d036ee16d102 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 28 May 2019 17:09:59 +0200 Subject: [PATCH] [partition] Restore BootLoader path in Choice Page - after model resets, restore what was previously selected. - This avoids having an **empty** combobox, SEE #1141 but does not actually set it back to the value the user had previously picked (e.g. changing swap settings **still** breaks the selection). --- src/modules/partition/gui/ChoicePage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 04eec56ed..d9fb89b3f 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1025,6 +1025,12 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice ) eraseBootloaderLabel->setText( tr( "Boot loader location:" ) ); m_bootloaderComboBox = createBootloaderComboBox( eraseWidget ); + connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, + [ this ]() + { + Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() ); + } + ); connect( m_core, &PartitionCoreModule::deviceReverted, this, [ this ]( Device* dev ) {