Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve CairoMakie insert! ambiguity #4038

Merged
merged 5 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

- Correct a bug in the `project` function when projecting using a `Scene`. [#3909](https://github.com/MakieOrg/Makie.jl/pull/3909).
- Correct a method ambiguity in `insert!` which was causing `PlotList` to fail on CairoMakie. [#4038](https://github.com/MakieOrg/Makie.jl/pull/4038)

## [0.21.5] - 2024-07-07

Expand Down
2 changes: 2 additions & 0 deletions CairoMakie/src/screen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ Base.size(screen::Screen) = round.(Int, (screen.surface.width, screen.surface.he
# we render the scene directly, since we have
# no screen dependent state like in e.g. opengl
Base.insert!(screen::Screen, scene::Scene, plot) = nothing
# to resolve method ambiguity, since this method is defined in Makie for MakieScreen and PlotList:
Base.insert!(screen::Screen, scene::Scene, plot::Plot{plotlist}) = nothing
aplavin marked this conversation as resolved.
Show resolved Hide resolved
function Base.delete!(screen::Screen, scene::Scene, plot::AbstractPlot)
# Currently, we rerender every time, so nothing needs
# to happen here. However, in the event that changes,
Expand Down
6 changes: 6 additions & 0 deletions CairoMakie/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ end
rm("test.mp4")
end

@testset "plotlist no ambiguity (#4038)" begin
f = plotlist([Makie.SpecApi.Scatter(1:10)])
Makie.colorbuffer(f; backend=CairoMakie)
plotlist!([Makie.SpecApi.Scatter(1:10)])
end


excludes = Set([
"Colored Mesh",
Expand Down
Loading