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

Commit

Permalink
Fix compilation error on Julia 1.3 (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Apr 14, 2021
1 parent c202baf commit bd42686
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- '1.4'
- '1.3'
- 'nightly'
os:
- ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
authors = ["Simon Danisch", "Julius Krumbiegel"]
name = "AbstractPlotting"
uuid = "537997a7-5e4e-5d89-9595-2241ea00577e"
version = "0.17.0"
authors = ["Simon Danisch", "Julius Krumbiegel"]
version = "0.17.1"

[deps]
Animations = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
Expand Down
2 changes: 1 addition & 1 deletion src/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ function line_diff_pattern(ls_str::AbstractString, gaps = :normal)
pattern = Float64[]
for i in 1:length(ls_str)
curr_char = ls_str[i]
next_char = i == lastindex(ls_str) ? ls_str[begin] : ls_str[i+1]
next_char = i == lastindex(ls_str) ? ls_str[firstindex(ls_str)] : ls_str[i+1]
# push dash or dot
if curr_char == '-'
push!(pattern, dash)
Expand Down
4 changes: 2 additions & 2 deletions src/figureplotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function plot!(P::PlotFunc, fp::FigurePosition, args...; kwargs...)
if !(length(c) == 1 && c[1] isa Union{Axis, LScene})
error("There needs to be a single axis at $(fp.gp.span), $(fp.gp.side) to plot into.\nUse a non-mutating plotting command to create an axis implicitly.")
end
ax = only(c)
ax = first(c)
plot!(P, ax, args...; kwargs...)
end

Expand Down Expand Up @@ -141,6 +141,6 @@ function plot!(P::PlotFunc, fsp::FigureSubposition, args...; kwargs...)
if !(length(c) == 1 && c[1] isa Union{Axis, LScene})
error("There is not just one axis at $(gp).")
end
ax = only(c)
ax = first(c)
plot!(P, ax, args...; kwargs...)
end
4 changes: 2 additions & 2 deletions src/figures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function get_layout_at!(fp::FigurePosition; createmissing = false)
if isempty(layouts) && createmissing
fp.gp[] = GridLayoutBase.GridLayout()
elseif length(layouts) == 1
only(layouts)::GridLayoutBase.GridLayout
first(layouts)::GridLayoutBase.GridLayout
else
nothing
end
Expand All @@ -167,7 +167,7 @@ function get_layout_at!(fsp::FigureSubposition; createmissing = false)
if isempty(layouts) && createmissing
gp[] = GridLayoutBase.GridLayout()
elseif length(layouts) == 1
only(layouts)::GridLayoutBase.GridLayout
first(layouts)::GridLayoutBase.GridLayout
else
nothing
end
Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/mousestatemachine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function addmouseevents!(scene, elements...)
# we also only react if one button is pressed, because otherwise things go crazy (pressed left button plus clicks from other buttons in between are not allowed, e.g.)
if mousedrag == Mouse.down
if length(pressed_buttons) == 1
button = only(pressed_buttons)
button = first(pressed_buttons)
mouse_downed_button[] = button

if mouse_was_inside[]
Expand Down

2 comments on commit bd42686

@jkrumbiegel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34347

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.17.1 -m "<description of version>" bd426869fa1685c89c847f3821d335474798341e
git push origin v0.17.1

Please sign in to comment.