Fixed Grid crash with search field, fixes #1410
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- Fixed possible rare dupe bug with Importer (raoulvdberge)
|
- Fixed possible rare dupe bug with Importer (raoulvdberge)
|
||||||
- Fixed Shulker Box dupe bug with Destructor (raoulvdberge)
|
- Fixed Shulker Box dupe bug with Destructor (raoulvdberge)
|
||||||
- Fixed Grid crash with search history (raoulvdberge)
|
- Fixed Grid crash with search history (raoulvdberge)
|
||||||
|
- Fixed Grid crash with search field (raoulvdberge)
|
||||||
- Fixed External Storage not working without Storage Drawers (raoulvdberge)
|
- Fixed External Storage not working without Storage Drawers (raoulvdberge)
|
||||||
|
|
||||||
### 1.5.14
|
### 1.5.14
|
||||||
|
|||||||
@@ -539,23 +539,25 @@ public class GuiGrid extends GuiBase implements IGridDisplay {
|
|||||||
public void mouseClicked(int mouseX, int mouseY, int clickedButton) throws IOException {
|
public void mouseClicked(int mouseX, int mouseY, int clickedButton) throws IOException {
|
||||||
super.mouseClicked(mouseX, mouseY, clickedButton);
|
super.mouseClicked(mouseX, mouseY, clickedButton);
|
||||||
|
|
||||||
boolean wasSearchFieldFocused = searchField.isFocused();
|
|
||||||
|
|
||||||
searchField.mouseClicked(mouseX, mouseY, clickedButton);
|
|
||||||
|
|
||||||
if (tabHovering >= 0 && tabHovering < grid.getTabs().size()) {
|
if (tabHovering >= 0 && tabHovering < grid.getTabs().size()) {
|
||||||
grid.onTabSelectionChanged(tabHovering);
|
grid.onTabSelectionChanged(tabHovering);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clickedButton == 1 && inBounds(79, 5 + getTabDelta(), 90, 12, mouseX - guiLeft, mouseY - guiTop)) {
|
if (searchField != null) {
|
||||||
searchField.setText("");
|
boolean wasSearchFieldFocused = searchField.isFocused();
|
||||||
searchField.setFocused(true);
|
|
||||||
|
|
||||||
sortItems();
|
searchField.mouseClicked(mouseX, mouseY, clickedButton);
|
||||||
|
|
||||||
updateJEI();
|
if (clickedButton == 1 && inBounds(79, 5 + getTabDelta(), 90, 12, mouseX - guiLeft, mouseY - guiTop)) {
|
||||||
} else if (wasSearchFieldFocused != searchField.isFocused()) {
|
searchField.setText("");
|
||||||
saveHistory();
|
searchField.setFocused(true);
|
||||||
|
|
||||||
|
sortItems();
|
||||||
|
|
||||||
|
updateJEI();
|
||||||
|
} else if (wasSearchFieldFocused != searchField.isFocused()) {
|
||||||
|
saveHistory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean clickedClear = clickedButton == 0 && isOverClear(mouseX - guiLeft, mouseY - guiTop);
|
boolean clickedClear = clickedButton == 0 && isOverClear(mouseX - guiLeft, mouseY - guiTop);
|
||||||
|
|||||||
Reference in New Issue
Block a user