mirror of
https://github.com/huderlem/porymap.git
synced 2026-11-11 11:35:57 -06:00
Stop changing settings if their features fail to load
This commit is contained in:
@@ -141,8 +141,8 @@ int ScriptUtility::getMainTab() {
|
||||
void ScriptUtility::setMainTab(int index) {
|
||||
if (!window || !window->ui || !window->ui->mainTabBar || index < 0 || index >= window->ui->mainTabBar->count())
|
||||
return;
|
||||
// Can't select Wild Encounters tab if it's disabled
|
||||
if (index == 4 && !userConfig.getEncounterJsonActive())
|
||||
// Can't select tab if it's disabled
|
||||
if (!window->ui->mainTabBar->isTabEnabled(index))
|
||||
return;
|
||||
window->on_mainTabBar_tabBarClicked(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user