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

Commit

Permalink
Merge pull request #556 from JuliaPlots/sd/fix_ml
Browse files Browse the repository at this point in the history
fix makielayout
  • Loading branch information
SimonDanisch authored Nov 17, 2020
2 parents e103d11 + c61d368 commit 81349ba
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion src/dictlike.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,20 @@ function Base.copy(attributes::Attributes)
result = Attributes()
for (k, v) in attributes
# We need to create a new Signal to have a real copy
result[k] = Observable{Any}(to_value(v))
result[k] = copy(v)
end
return result
end

function Base.deepcopy(obs::Observable)
return Observable{Any}(to_value(obs))
end

function Base.deepcopy(attributes::Attributes)
result = Attributes()
for (k, v) in attributes
# We need to create a new Signal to have a real copy
result[k] = deepcopy(v)
end
return result
end
Expand Down
5 changes: 3 additions & 2 deletions src/theming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,19 @@ const minimal_default = Attributes(
),
)

const _current_default_theme = copy(minimal_default)
const _current_default_theme = deepcopy(minimal_default)

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

function set_theme!(new_theme::Attributes)
empty!(_current_default_theme)
new_theme = merge!(new_theme, minimal_default)
new_theme = merge!(new_theme, deepcopy(minimal_default))
merge!(_current_default_theme, new_theme)
return
end

function set_theme!(;kw_args...)
set_theme!(Attributes(; kw_args...))
end
5 changes: 2 additions & 3 deletions test/ReferenceTests/src/image_download.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ function download_refimages(tag=last_major_version())
images = basedir("refimages")
isfile(images_tar) && rm(images_tar)
isdir(images) && rm(images, recursive=true, force=true)
Downloads.download(url, images_tar)
Base.download(url, images_tar)
Tar.extract(images_tar, images)
return images
end


# rm(joinpath(@__DIR__, "refimages"), force=true, recursive=true)

#
#
# using Pkg.TOML

0 comments on commit 81349ba

Please sign in to comment.