From a57eb8d263da1b11f394505190405276cd5872b2 Mon Sep 17 00:00:00 2001 From: mstiles92 Date: Wed, 26 Nov 2014 08:19:13 -0500 Subject: [PATCH] #470 Prevent the search box from losing focus in Auto Search and NEI Synchronized Auto Search modes. Without this patch applied there is no real difference between the auto and manual search box modes (other than whether the search box initially has focus when the GUI is opened). The search box should always have focus in auto mode, and should be able to lose focus in manual mode, as has always been the case until recently. This patch fixes the problem by preventing the search box from losing focus when in Auto and NEI Synchronized Auto search modes. --- .../appeng/client/gui/implementations/GuiMEMonitorable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java index 4e724f78a..6e6f00532 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java +++ b/src/main/java/appeng/client/gui/implementations/GuiMEMonitorable.java @@ -345,7 +345,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi @Override protected void mouseClicked(int xCoord, int yCoord, int btn) { - searchField.mouseClicked( xCoord, yCoord, btn ); + Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE ); + + if ( searchMode != SearchBoxMode.AUTOSEARCH && searchMode != SearchBoxMode.NEI_AUTOSEARCH ) + searchField.mouseClicked( xCoord, yCoord, btn ); if ( btn == 1 && searchField.isMouseIn( xCoord, yCoord ) ) {