Merge pull request #3677 from kb-1000/datapacks-button-disable

NOISSUE disable datapacks button in the world screen if no world is selected
This commit is contained in:
Petr Mrázek 2021-03-26 00:36:30 +00:00 committed by GitHub
commit 8f4062b5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,6 +314,7 @@ void WorldListPage::worldChanged(const QModelIndex &current, const QModelIndex &
ui->actionRemove->setEnabled(enable);
ui->actionCopy->setEnabled(enable);
ui->actionRename->setEnabled(enable);
ui->actionDatapacks->setEnabled(enable);
bool hasIcon = !index.data(WorldList::IconFileRole).isNull();
ui->actionReset_Icon->setEnabled(enable && hasIcon);
}