[partition] Convenience for selecting default mount point

- map blank to the "(no mount point)" string for UI purposes
This commit is contained in:
Adriaan de Groot 2018-05-15 06:13:19 -04:00
parent fda2e54e0f
commit a4997c4be8
3 changed files with 16 additions and 2 deletions

View file

@ -46,3 +46,12 @@ standardMountPoints(QComboBox& combo)
combo.addItems( standardMountPoints() );
}
void
standardMountPoints(QComboBox& combo, const QString& selected)
{
standardMountPoints( combo );
if ( selected.isEmpty() )
combo.setCurrentIndex( 0 );
else
combo.setCurrentText( selected );
}