diff --git a/src/main/java/bdv/fx/viewer/ViewerPanelFX.java b/src/main/java/bdv/fx/viewer/ViewerPanelFX.java index 3a9cce6c1..e46d04d3b 100644 --- a/src/main/java/bdv/fx/viewer/ViewerPanelFX.java +++ b/src/main/java/bdv/fx/viewer/ViewerPanelFX.java @@ -190,7 +190,7 @@ public ViewerPanelFX( transformListeners.add(tf -> Paintera.whenPaintable(getDisplay()::drawOverlays)); this.state = new ViewerState(numTimepoints, this); - state.addListener(obs -> Paintera.whenPaintable(this::requestRepaint)); + state.addListener(obs -> Paintera.ifPaintable(this::requestRepaint)); Paintera.whenPaintable(() -> getDisplay().drawOverlays());