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