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