Skip to content

Commit

Permalink
Fixed an issue when quad tab for item grid not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Exslims committed Mar 18, 2017
1 parent 9356086 commit 6f6c55f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -166,17 +167,20 @@ public void initHandlers() {
}
private Optional<ItemCell> getCellByCoordinates(StashTab tab, int x, int y){
Optional<ItemCell> 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){
Expand Down

0 comments on commit 6f6c55f

Please sign in to comment.