fix the search strings resetting when changing the terminal size in the interface terminal (#243)

Co-authored-by: MCTBL <30978504+MCTBL@users.noreply.github.com>
This commit is contained in:
AlexdoruandMCTBL authored and GitHub committed 2024-11-17 13:48:36 +01:00
1 parent d699539bd0
commit e48073976d
1 file changed
+11 -6
@@ -220,9 +220,7 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
offsetY = guiButtonAssemblersOnly.yPosition + 18;
if (AEConfig.instance.preserveSearchBar || isSubGui()) {
setSearchString();
}
setSearchString();
this.setScrollBar();
this.repositionSlots();
@@ -344,9 +342,16 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
}
public void setSearchString() {
searchFieldInputs.setText(searchFieldInputsText);
searchFieldOutputs.setText(searchFieldOutputsText);
searchFieldNames.setText(searchFieldNamesText);
boolean setString = AEConfig.instance.preserveSearchBar || isSubGui();
if (searchFieldInputs.getText().isEmpty() && setString) {
searchFieldInputs.setText(searchFieldInputsText);
}
if (searchFieldOutputs.getText().isEmpty() && setString) {
searchFieldOutputs.setText(searchFieldOutputsText);
}
if (searchFieldNames.getText().isEmpty() && setString) {
searchFieldNames.setText(searchFieldNamesText);
}
}
@Override