[partition] Centralize setting-of-mountpoint

- map empty to the 0'th index
 - add new entries as needed

This avoids having selected index 0, but a different text.
This commit is contained in:
Adriaan de Groot 2018-05-15 08:01:18 -04:00
parent a49c39bb53
commit 4402198b37
3 changed files with 24 additions and 1 deletions

View file

@ -328,7 +328,7 @@ CreatePartitionDialog::initFromPartitionToCreate( Partition* partition )
m_ui->fsComboBox->setCurrentText( FileSystem::nameForType( fsType ) );
// Mount point
m_ui->mountPointComboBox->setCurrentText( PartitionInfo::mountPoint( partition ) );
setSelectedMountPoint( m_ui->mountPointComboBox, PartitionInfo::mountPoint( partition ) );
updateMountPointUi();
}