[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).
This commit is contained in:
Adriaan de Groot 2019-05-28 17:09:59 +02:00
parent 0ebabfafd4
commit f1f5b6c1bb

View File

@ -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 )
{