Merge pull request #6220 from deathbeam/fix-hidden-check

Add back check for widget.isHidden() to TabInterface
This commit is contained in:
Tomas Slusny
2018-10-29 12:21:55 +01:00
committed by GitHub

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)