[partition] Introduce post-reset slot for boot loader selection
This commit is contained in:
parent
17aeaa134a
commit
dc04aa999d
@ -79,6 +79,7 @@ PartitionPage::PartitionPage( PartitionCoreModule* core, QWidget* parent )
|
|||||||
value( "alwaysShowPartitionLabels" ).toBool() );
|
value( "alwaysShowPartitionLabels" ).toBool() );
|
||||||
m_ui->deviceComboBox->setModel( m_core->deviceModel() );
|
m_ui->deviceComboBox->setModel( m_core->deviceModel() );
|
||||||
m_ui->bootLoaderComboBox->setModel( m_core->bootLoaderModel() );
|
m_ui->bootLoaderComboBox->setModel( m_core->bootLoaderModel() );
|
||||||
|
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset, this, &PartitionPage::restoreSelectedBootLoader );
|
||||||
PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()->
|
PartitionBarsView::NestedPartitionsMode mode = Calamares::JobQueue::instance()->globalStorage()->
|
||||||
value( "drawNestedPartitions" ).toBool() ?
|
value( "drawNestedPartitions" ).toBool() ?
|
||||||
PartitionBarsView::DrawNestedPartitions :
|
PartitionBarsView::DrawNestedPartitions :
|
||||||
@ -505,6 +506,12 @@ PartitionPage::updateSelectedBootLoaderIndex()
|
|||||||
cDebug() << "Selected bootloader index" << m_lastSelectedBootLoaderIndex;
|
cDebug() << "Selected bootloader index" << m_lastSelectedBootLoaderIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PartitionPage::restoreSelectedBootLoader()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionPage::updateFromCurrentDevice()
|
PartitionPage::updateFromCurrentDevice()
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,8 @@ private slots:
|
|||||||
void updateBootLoaderInstallPath();
|
void updateBootLoaderInstallPath();
|
||||||
/// @brief Explicitly selected boot loader path
|
/// @brief Explicitly selected boot loader path
|
||||||
void updateSelectedBootLoaderIndex();
|
void updateSelectedBootLoaderIndex();
|
||||||
|
/// @brief After boot loader model changes, try to preserve previously set value
|
||||||
|
void restoreSelectedBootLoader();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer< Ui_PartitionPage > m_ui;
|
QScopedPointer< Ui_PartitionPage > m_ui;
|
||||||
|
Loading…
Reference in New Issue
Block a user