Autoselect first tab when no tab is selected. (pt. 2)
This commit is contained in:
@@ -205,7 +205,11 @@ public class GuiCraftingMonitor extends GuiBase implements IResizableDisplay {
|
|||||||
Optional<UUID> currentTab = craftingMonitor.getTabSelected();
|
Optional<UUID> currentTab = craftingMonitor.getTabSelected();
|
||||||
|
|
||||||
if (currentTab.isPresent()) {
|
if (currentTab.isPresent()) {
|
||||||
return getTabById(currentTab.get());
|
IGridTab tab = getTabById(currentTab.get());
|
||||||
|
|
||||||
|
if (tab != null) {
|
||||||
|
return tab;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tasks.isEmpty()) {
|
if (tasks.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user