From 6f6c55fc5eb692e3306aecf069670f0f7f5ee256 Mon Sep 17 00:00:00 2001 From: Exslims Date: Sun, 19 Mar 2017 00:32:52 +0400 Subject: [PATCH] Fixed an issue when quad tab for item grid not working correctly --- .../mercury/platform/ui/frame/impl/ItemsGridFrame.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app-ui/src/main/java/com/mercury/platform/ui/frame/impl/ItemsGridFrame.java b/app-ui/src/main/java/com/mercury/platform/ui/frame/impl/ItemsGridFrame.java index 4375fcd1..0c385730 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/frame/impl/ItemsGridFrame.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/frame/impl/ItemsGridFrame.java @@ -1,5 +1,6 @@ package com.mercury.platform.ui.frame.impl; +import com.mercury.platform.shared.FrameStates; import com.mercury.platform.shared.events.EventRouter; import com.mercury.platform.shared.pojo.StashTab; import com.mercury.platform.ui.components.fields.style.MercuryScrollBarUI; @@ -166,17 +167,20 @@ public void initHandlers() { } private Optional getCellByCoordinates(StashTab tab, int x, int y){ Optional targetCell; + if(x > 12 || y > 12) { + tab.setQuad(true); + } if(tab.isQuad()){ targetCell = quadCells .stream() .filter(cell -> (cell.getX() == x && cell.getY() == y)) .findFirst(); - }else { - targetCell = defaultCells + return targetCell; + } + targetCell = defaultCells .stream() .filter(cell -> (cell.getX() == x && cell.getY() == y)) .findFirst(); - } return targetCell; } private ItemInfoPanel createGridItem(ItemMessage message,ItemCell cell,StashTab stashTab){