summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/gui/selectiveinstallwidget.cpp')
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidget.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
index cc5abb40ad..902f9861ed 100644
--- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
@@ -147,18 +147,17 @@ void SelectiveInstallWidget::updateVersion(void)
}
// select previously selected version
- int index = ui.selectedVersion->findData(RbSettings::value(RbSettings::Build).toString());
- if(index != -1) {
- ui.selectedVersion->setCurrentIndex(index);
- }
- else if(!m_versions[SystemInfo::BuildRelease].isEmpty()) {
- index = ui.selectedVersion->findData("release");
- ui.selectedVersion->setCurrentIndex(index);
- }
- else {
- index = ui.selectedVersion->findData("development");
- ui.selectedVersion->setCurrentIndex(index);
+ int index = ui.selectedVersion->findData(
+ static_cast<SystemInfo::BuildType>(RbSettings::value(RbSettings::Build).toInt()));
+ if(index < 0) {
+ if(!m_versions[SystemInfo::BuildRelease].isEmpty()) {
+ index = ui.selectedVersion->findData(SystemInfo::BuildRelease);
+ }
+ else {
+ index = ui.selectedVersion->findData(SystemInfo::BuildCurrent);
+ }
}
+ ui.selectedVersion->setCurrentIndex(index);
// check if Rockbox is installed. If it is untick the bootloader option, as
// well as if the selected player doesn't need a bootloader.
if(m_blmethod == "none") {