Revert "delay repo view sorting to once per tick"
This reverts commit d9588441b0.
This commit is contained in:
@@ -103,7 +103,6 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
private int currentMouseY = 0;
|
||||
private boolean delayedUpdate;
|
||||
|
||||
private boolean updateView = true;
|
||||
protected int jeiOffset = Loader.isModLoaded("jei") ? 24 : 0;
|
||||
|
||||
public GuiMEMonitorable(final InventoryPlayer inventoryPlayer, final ITerminalHost te) {
|
||||
@@ -162,7 +161,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
if (!this.delayedUpdate) {
|
||||
this.updateView = true;
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.searchField.setText(memoryText);
|
||||
this.searchField.selectAll();
|
||||
this.repo.setSearchString(memoryText);
|
||||
this.updateView = true;
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
craftingGridOffsetX = Integer.MAX_VALUE;
|
||||
@@ -380,7 +381,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if (btn == 1 && this.searchField.isMouseIn(xCoord, yCoord)) {
|
||||
this.searchField.setText("");
|
||||
this.repo.setSearchString("");
|
||||
this.updateView = true;
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
super.mouseClicked(xCoord, yCoord, btn);
|
||||
@@ -474,7 +476,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if (this.searchField.textboxKeyTyped(character, key)) {
|
||||
this.repo.setSearchString(this.searchField.getText());
|
||||
this.updateView = true;
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
// tell forge the key event is handled and should not be sent out
|
||||
this.keyHandled = mouseInGui;
|
||||
} else {
|
||||
@@ -501,7 +504,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.delayedUpdate = false;
|
||||
}
|
||||
}
|
||||
if (!this.delayedUpdate && updateView) {
|
||||
if (!this.delayedUpdate) {
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
@@ -537,7 +540,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.ViewBox.set(this.configSrc.getSetting(Settings.VIEW_MODE));
|
||||
}
|
||||
|
||||
this.updateView = true;
|
||||
this.repo.updateView();
|
||||
}
|
||||
|
||||
int getReservedSpace() {
|
||||
|
||||
@@ -55,8 +55,6 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource {
|
||||
private GuiImgButton units;
|
||||
private int tooltip = -1;
|
||||
|
||||
private boolean updateView = true;
|
||||
|
||||
public GuiNetworkStatus(final InventoryPlayer inventoryPlayer, final INetworkTool te) {
|
||||
super(new ContainerNetworkStatus(inventoryPlayer, te));
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
@@ -208,17 +206,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource {
|
||||
for (final IAEItemStack is : list) {
|
||||
this.repo.postUpdate(is);
|
||||
}
|
||||
this.updateView = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
if (updateView) {
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
updateView = false;
|
||||
}
|
||||
super.updateScreen();
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void setScrollBar() {
|
||||
|
||||
Reference in New Issue
Block a user