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

@@ -311,17 +311,23 @@ public class TabInterface
} }
public void handleWheel(final MouseWheelEvent event) public void handleWheel(final MouseWheelEvent event)
{
if (parent == null || !canvasBounds.contains(event.getPoint()))
{
return;
}
event.consume();
clientThread.invoke(() ->
{ {
if (isHidden()) if (isHidden())
{ {
return; return;
} }
if (canvasBounds.contains(event.getPoint())) scrollTab(event.getWheelRotation());
{ });
event.consume();
clientThread.invoke(() -> 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)