[partition] Introduce post-reset slot for boot loader selection

This commit is contained in:
Adriaan de Groot 2019-03-29 11:33:40 -04:00
parent 17aeaa134a
commit dc04aa999d
2 changed files with 9 additions and 0 deletions

View File

@ -79,6 +79,7 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
value( "alwaysShowPartitionLabels" ).toBool() );
m_ui->deviceComboBox->setModel( m_core->deviceModel() );
m_ui->bootLoaderComboBox->setModel( m_core->bootLoaderModel() );
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, this, &PartitionPage::restoreSelectedBootLoader );
PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()->
value( "drawNestedPartitions" ).toBool() ?
PartitionBarsView::DrawNestedPartitions :
@ -505,6 +506,12 @@ PartitionPage::updateSelectedBootLoaderIndex()
cDebug() << "Selected bootloader index" << m_lastSelectedBootLoaderIndex;
}
void
PartitionPage::restoreSelectedBootLoader()
{
}
void
PartitionPage::updateFromCurrentDevice()
{

View File

@ -57,6 +57,8 @@ private slots:
void updateBootLoaderInstallPath();
/// @brief Explicitly selected boot loader path
void updateSelectedBootLoaderIndex();
/// @brief After boot loader model changes, try to preserve previously set value
void restoreSelectedBootLoader();
private:
QScopedPointer< Ui_PartitionPage > m_ui;