Update jump heights only when necessary.

This method uses signaling (through a boolean) and I feel like it's
extremely hacky, but I tested this and it (kind of?) works.
Unfortunately I found this to potentially lag when resizing.

I am not sure if this is guaranteed to work (as in, produce correct
behaviour) or not, but to my understanding only LogicDialog uses LCanvas
(grep out "LCanvas\|canvas" and see) so it will most likely work?

I tested this and accidentally found an unrelated issue related to
LCanvas.maxJumpsDrawn, but I hope this will be fixed in the near future.
This commit is contained in:
code-explorer786
2024-06-27 15:47:18 +07:00
parent 26105a64f1
commit 282d21db05
2 changed files with 14 additions and 1 deletions

View File

@@ -256,6 +256,8 @@ public class LogicDialog extends BaseDialog{
dialog.addCloseButton();
dialog.show();
}).disabled(t -> canvas.statements.getChildren().size >= LExecutor.maxInstructions);
Core.app.post(canvas::rebuild);
}
public void show(String code, LExecutor executor, boolean privileged, Cons<String> modified){