From 360f38a819356666ad8d93ff1db645314d48c058 Mon Sep 17 00:00:00 2001 From: piexel Date: Sun, 25 Oct 2026 19:39:01 +0100 Subject: [PATCH] Show a newly picked object without moving the cursor A frame asked for while the last one was being taken, like the one that ends a load, was drawn and swapped before the earlier frame's swap, so the window kept the old object until something else redrew it. Model used: Claude Opus 5.5 --- .../main/java/art/arcane/iris/studio/map/OrbitViewport.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/art/arcane/iris/studio/map/OrbitViewport.java b/core/src/main/java/art/arcane/iris/studio/map/OrbitViewport.java index d9ac885eb..05886b3b1 100644 --- a/core/src/main/java/art/arcane/iris/studio/map/OrbitViewport.java +++ b/core/src/main/java/art/arcane/iris/studio/map/OrbitViewport.java @@ -382,17 +382,18 @@ final class OrbitViewport extends JComponent { /** * Until the card is opened, nothing knows whether frames can go into the window; the first picture opens it. A * frame that should have gone into the window but couldn't isn't tried again right away. A frame for a scene - * replaced meanwhile is never shown. + * replaced meanwhile is never shown. The frame counts as rendering until it is on its way to the screen, so a + * frame asked for while it is taken, like when it ends a load, can't be drawn over it first. */ private void finishFrame(OrbitScene frameScene, OrbitCamera frameCamera, ScreenTarget screen, OrbitPicture drawn, boolean missedScreen, long requestedAtNanos) { - rendering = false; measureFrameTime(System.nanoTime() - requestedAtNanos); if (frameScene == scene) { takePicture(drawn, frameCamera); paintPicture(drawn); showInWindow(screen, drawn); } + rendering = false; boolean canGoOnScreen = !missedScreen && canvas != null && !canvas.isVisible() && drawsOnScreen(); if (renderAgain || drawn.catchingUp() || canGoOnScreen) { renderAgain = false;