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:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user