From e3bc27d50c0162f36c761c6e75138a13c45e235f Mon Sep 17 00:00:00 2001 From: piexel Date: Sun, 25 Oct 2026 21:49:03 +0100 Subject: [PATCH] Keep hidden 3D views from covering the open view A 3D view asked for a frame while its card was hidden, for example when the sidebar resized, showed its GPU window again. AWT maps a shown canvas even under a hidden parent, so the window covered the open view in black. Frames only go into the window while the view is on screen. Model used: Opus 5.5 --- .../java/art/arcane/iris/studio/map/OrbitViewport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 05886b3b1..10de846f0 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 @@ -354,8 +354,9 @@ final class OrbitViewport extends JComponent { } /** - * Frames go straight into the window when the scene can be drawn that way, Swing has nothing to paint over the - * whole view, and the screen's pixels are the view's own. The window is shown before the frame is drawn into it. + * Frames go straight into the window when the view is on screen, the scene can be drawn that way, Swing has nothing + * to paint over the whole view, and the screen's pixels are the view's own. The window is shown before the frame is + * drawn into it. Showing it maps it even while its card is hidden, where it would cover the card that is open. * * @return the window, or nothing to draw a picture for Swing instead */ @@ -370,8 +371,8 @@ final class OrbitViewport extends JComponent { } private boolean drawsOnScreen() { - return canvas != null && canvas.window() != 0L && scene != null && !scene.isEmpty() && scene.canRenderOnScreen() - && !isLoadingShown() && hasUnscaledPixels(); + return canvas != null && isShowing() && canvas.window() != 0L && scene != null && !scene.isEmpty() + && scene.canRenderOnScreen() && !isLoadingShown() && hasUnscaledPixels(); } private boolean hasUnscaledPixels() {