Skip to content

Commit

Permalink
Simplify Vis.save
Browse files Browse the repository at this point in the history
  • Loading branch information
ederag committed Aug 20, 2024
1 parent 4f83fad commit dfac160
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Vis/Visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,7 @@ end
Save the current Makie scene to an image file.
"""
function save(path::String)
# save closes the window so just display it again as a work-around
# for some reason the size isn't maintained automatically so we just reset it manually
size = Makie.size(current_main_scene)
Makie.save(path, current_3d_scene.scene)
Makie.resize!(current_main_scene, size)
display(current_main_scene)
Makie.save(path, current_main_scene; update = false)
end
function save(::Nothing) end

Expand Down

0 comments on commit dfac160

Please sign in to comment.