if the file system we want to set the combo box to cannot be found in it, set
it to the first value; don't set it to -1 svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119609
This commit is contained in:
parent
d603f21b1e
commit
1c97342be3
2
TODO
2
TODO
|
@ -9,8 +9,6 @@ Plans and ideas for 1.1:
|
|||
|
||||
Bugs to fix for 1.1:
|
||||
|
||||
* make sure the default file system can indeed be created
|
||||
|
||||
* handling of illegal values in the size dialog spin boxes is not correct: we
|
||||
need to make use of the validator, not just overwrite with the previous value
|
||||
if the new one is not legal. i.e., we must constantly update the valid ranges
|
||||
|
|
|
@ -42,7 +42,8 @@ FileSystem::Type GeneralPageWidget::defaultFileSystem() const
|
|||
|
||||
void GeneralPageWidget::setDefaultFileSystem(FileSystem::Type t)
|
||||
{
|
||||
comboDefaultFileSystem().setCurrentIndex(comboDefaultFileSystem().findText(FileSystem::nameForType(t)));
|
||||
const int idx = comboDefaultFileSystem().findText(FileSystem::nameForType(t));
|
||||
comboDefaultFileSystem().setCurrentIndex(idx != -1 ? idx : 0);
|
||||
}
|
||||
|
||||
QString GeneralPageWidget::backend() const
|
||||
|
|
|
@ -72,7 +72,8 @@ void NewDialog::setupDialog()
|
|||
dialogWidget().comboFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||
|
||||
QString selected = FileSystem::nameForType(FileSystem::defaultFileSystem());
|
||||
dialogWidget().comboFileSystem().setCurrentIndex(dialogWidget().comboFileSystem().findText(selected));
|
||||
const int idx = dialogWidget().comboFileSystem().findText(selected);
|
||||
dialogWidget().comboFileSystem().setCurrentIndex(idx != -1 ? idx : 0);
|
||||
|
||||
dialogWidget().radioPrimary().setVisible(partitionRoles() & PartitionRole::Primary);
|
||||
dialogWidget().radioExtended().setVisible(partitionRoles() & PartitionRole::Extended);
|
||||
|
|
Loading…
Reference in New Issue