Skip to content

Commit

Permalink
fix redisplaying figures on same screen
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Jan 29, 2024
1 parent 6bba224 commit b95abb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GLMakie/src/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ function Base.display(screen::Screen, scene::Scene; connect=true)
# So, the GLFW window events are not guarantee to fire
# when we close a window, so we ensure this here!
if !Makie.is_displayed(screen, scene)
if !isnothing(screen.root_scene)
delete!(screen, screen.root_scene)
screen.root_scene = nothing
end
display_scene!(screen, scene)
else
@assert screen.root_scene === scene "internal error. Scene already displayed by screen but not as root scene"
Expand Down

0 comments on commit b95abb2

Please sign in to comment.