Sensible default to current device in bootloader picker.

main
Teo Mrnjavac 9 years ago
parent 0cff1cd7ec
commit 64d296aa06

@ -324,6 +324,13 @@ ChoicePage::createBootloaderComboBox( ExpandableRadioButton* parentButton )
if ( expanded ) if ( expanded )
updateBootloaderDevice(); updateBootloaderDevice();
}, Qt::QueuedConnection ); }, Qt::QueuedConnection );
connect( m_core, &PartitionCoreModule::deviceReverted,
this, [ this, bcb ]( Device* dev )
{
if ( bcb->model() != m_core->bootLoaderModel() )
bcb->setModel( m_core->bootLoaderModel() );
bcb->setCurrentIndex( m_lastSelectedDeviceIndex );
} );
// ^ Must be Queued so it's sure to run when the widget is already visible. // ^ Must be Queued so it's sure to run when the widget is already visible.
return bcb; return bcb;

Loading…
Cancel
Save