summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/pages/VersionPage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/pages/VersionPage.cpp b/gui/pages/VersionPage.cpp
index a59598a2..3fd98d27 100644
--- a/gui/pages/VersionPage.cpp
+++ b/gui/pages/VersionPage.cpp
@@ -84,6 +84,10 @@ VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent)
connect(ui->libraryTreeView->selectionModel(), &QItemSelectionModel::currentChanged,
this, &VersionPage::versionCurrent);
updateVersionControls();
+ // select first item.
+ auto index = main_model->index(0,0);
+ if(index.isValid())
+ ui->libraryTreeView->setCurrentIndex(index);
}
else
{
@@ -373,7 +377,8 @@ void VersionPage::versionCurrent(const QModelIndex &current, const QModelIndex &
ui->moveLibraryUpBtn->setEnabled(enabled);
}
QString selectedId = m_version->versionFileId(current.row());
- if (selectedId == "net.minecraft" || selectedId == "org.multimc.custom.json")
+ if (selectedId == "net.minecraft" || selectedId == "org.multimc.custom.json" ||
+ selectedId == "org.multimc.version.json")
{
ui->changeMCVersionBtn->setEnabled(true);
}