From 0dc2edbd988a5e6280279f9f62f30312b0ad2fb9 Mon Sep 17 00:00:00 2001 From: "Ralph A. Smith" Date: Mon, 2 Jul 2018 10:29:16 -0400 Subject: [PATCH] correct update from Nullables well that was embarrassing. --- src/components.jl | 2 +- src/plot.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components.jl b/src/components.jl index 081a21ba..4db24d37 100644 --- a/src/components.jl +++ b/src/components.jl @@ -450,7 +450,7 @@ function series_annotations(strs::AbstractVector, args...) scalefactor = (1,1) for arg in args if isa(arg, Shape) || (isa(arg, AbstractVector) && eltype(arg) == Shape) - shp = Union{Any, Nothing}() + shp = Union{Any, Nothing}(arg) elseif isa(arg, Font) fnt = arg elseif isa(arg, Symbol) && haskey(_shapes, arg) diff --git a/src/plot.jl b/src/plot.jl index c6b0ed5e..9cc907d5 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -14,9 +14,9 @@ function current() if isplotnull() error("No current plot/subplot") end - get(CURRENT_PLOT.nullableplot) + CURRENT_PLOT.nullableplot end -current(plot::AbstractPlot) = (CURRENT_PLOT.nullableplot == nothing) +current(plot::AbstractPlot) = (CURRENT_PLOT.nullableplot = plot) # ---------------------------------------------------------