general fixes
All checks were successful
JaCoCo Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 60.67% (15276/25178) * Branch Coverage: 53.64% (5782/10779) * Lines of Code: 25178 * Cyclomatic Complexity: 9960 #### Quality Gates Summary Output truncated.
Test / Build skipped: 11, passed: 545

This commit is contained in:
bQUARKz 2026-04-07 07:48:32 +01:00
parent 7b0cf2feb4
commit bff0015f02
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package p.studio.controls.shell;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
@ -12,6 +13,7 @@ import p.studio.Container;
import p.studio.controls.lifecycle.StudioControlLifecycle;
import p.studio.controls.lifecycle.StudioControlLifecycleSupport;
import p.studio.execution.StudioExecutionSessionService;
import p.studio.execution.StudioExecutionSnapshot;
import p.studio.execution.StudioExecutionState;
import p.studio.utilities.events.EventSubscription;
import p.studio.utilities.i18n.I18n;
@ -78,7 +80,15 @@ public final class StudioRunSurfaceControl extends HBox implements StudioControl
if (sessionSubscription != null) {
return;
}
sessionSubscription = executionSessionService.subscribe(snapshot -> running.set(isRunningState(snapshot.state())));
sessionSubscription = executionSessionService.subscribe(this::handleSessionUpdate);
}
private void handleSessionUpdate(final StudioExecutionSnapshot snapshot) {
if (Platform.isFxApplicationThread()) {
running.set(isRunningState(snapshot.state()));
return;
}
Platform.runLater(() -> running.set(isRunningState(snapshot.state())));
}
@Override

View File

@ -15,7 +15,7 @@ fn init() -> void
fn abs_i(v: int) -> int
{
if (v < 0) {
return 0 - v;
return -v;
}
return v;
}