Add back check for widget.isHidden() to TabInterface

This check is still required, because in rare circumstances the bank
widget is simply not nulled.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-10-27 20:28:38 +02:00
parent 978ea05cbe
commit f1b2b0df4a

View File

@@ -312,16 +312,22 @@ public class TabInterface
public void handleWheel(final MouseWheelEvent event) public void handleWheel(final MouseWheelEvent event)
{ {
if (isHidden()) if (parent == null || !canvasBounds.contains(event.getPoint()))
{ {
return; return;
} }
if (canvasBounds.contains(event.getPoint())) event.consume();
clientThread.invoke(() ->
{ {
event.consume(); if (isHidden())
clientThread.invoke(() -> scrollTab(event.getWheelRotation())); {
} return;
}
scrollTab(event.getWheelRotation());
});
} }
public void handleAdd(MenuEntryAdded event) public void handleAdd(MenuEntryAdded event)
@@ -687,7 +693,7 @@ public class TabInterface
private boolean isHidden() private boolean isHidden()
{ {
Widget widget = client.getWidget(WidgetInfo.BANK_CONTAINER); Widget widget = client.getWidget(WidgetInfo.BANK_CONTAINER);
return !config.tabs() || widget == null; return !config.tabs() || widget == null || widget.isHidden();
} }
private void loadTab(String tag) private void loadTab(String tag)