mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
Tweak version page: select first item by default, allow changing version of 'version.json'.
This commit is contained in:
parent
c08bfce5f2
commit
478815dae6
@ -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 ¤t, 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user