api util setMainTab ignores command when in layout only mode
This commit is contained in:
parent
f485ebdd3e
commit
2d2b7f723b
1 changed files with 3 additions and 0 deletions
|
@ -144,6 +144,9 @@ void ScriptUtility::setMainTab(int index) {
|
||||||
// Can't select Wild Encounters tab if it's disabled
|
// Can't select Wild Encounters tab if it's disabled
|
||||||
if (index == 4 && !userConfig.getEncounterJsonActive())
|
if (index == 4 && !userConfig.getEncounterJsonActive())
|
||||||
return;
|
return;
|
||||||
|
// don't change tab when not editing a map
|
||||||
|
if (!window->editor || !window->editor->map)
|
||||||
|
return;
|
||||||
window->on_mainTabBar_tabBarClicked(index);
|
window->on_mainTabBar_tabBarClicked(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue