diff --git a/src/conversions.jl b/src/conversions.jl index d5b38102943..f9d3a96a64f 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -16,9 +16,6 @@ function convert_arguments(T::Type{<:AbstractPlot}, args...; kw...) # Meaning, it needs to be a conversion trait, or it needs single_convert_arguments or expand_dimensions CT = conversion_trait(T, args...) - # Try to expand dimensions first, as this is the most basic step! - expanded = expand_dimensions(CT, args...) - !isnothing(expanded) && return convert_arguments(T, expanded...; kw...) # Try single argument convert after arguments_converted = map(convert_single_argument, args) if arguments_converted !== args diff --git a/test/convert_arguments.jl b/test/convert_arguments.jl index 90ab2608f4e..88e9051418e 100644 --- a/test/convert_arguments.jl +++ b/test/convert_arguments.jl @@ -66,6 +66,10 @@ end @test_throws ArgumentError heatmap(1im) end +# custom vector type to ensure that the conversion can be overriden for vectors +struct MyConvVector <: AbstractVector{Float64} end +Makie.convert_arguments(::PointBased, ::MyConvVector) = ([Point(10, 20)],) + @testset "convert_arguments" begin #= TODO: @@ -227,6 +231,8 @@ end @test apply_conversion(CT, m2) isa Tuple{Vector{Point2{T_out}}} @test apply_conversion(CT, m3) isa Tuple{Vector{Point3{T_out}}} + + @test apply_conversion(CT, MyConvVector()) == ([Point(10, 20)],) end end