Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
fix MakieOrg/Makie.jl#726 for real
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Dec 11, 2020
1 parent f7410de commit 0b8067b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/scenes.jl
Expand Up @@ -109,7 +109,7 @@ end
function Scene(;clear=true, transform_func=identity, scene_attributes...)
events = Events()
theme = current_default_theme(; scene_attributes...)
attributes = copy(theme)
attributes = deepcopy(theme)
px_area = lift(attributes.resolution) do res
IRect(0, 0, res)
end
Expand Down Expand Up @@ -333,9 +333,9 @@ end
# Since we can use Combined like a scene in some circumstances, we define this alias
theme(x::SceneLike, args...) = theme(x.parent, args...)
theme(x::Scene) = x.theme
theme(x::Scene, key) = x.theme[key]
theme(x::AbstractPlot, key) = x.attributes[key]
theme(::Nothing, key::Symbol) = current_default_theme()[key]
theme(x::Scene, key) = deepcopy(x.theme[key])
theme(x::AbstractPlot, key) = deepcopy(x.attributes[key])
theme(::Nothing, key::Symbol) = deepcopy(current_default_theme()[key])

Base.push!(scene::Combined, subscene) = nothing # Combined plots add themselves uppon creation

Expand Down
2 changes: 1 addition & 1 deletion src/theming.jl
Expand Up @@ -92,7 +92,7 @@ const minimal_default = Attributes(
const _current_default_theme = deepcopy(minimal_default)

function current_default_theme(; kw_args...)
return merge!(Attributes(kw_args), _current_default_theme)
return merge!(Attributes(kw_args), deepcopy(_current_default_theme))
end

function set_theme!(new_theme::Attributes)
Expand Down

0 comments on commit 0b8067b

Please sign in to comment.