Skip to content

Commit 6cb93ba

Browse files
authored
Shelter the set_dsBB!() fun against multiple recompiles. (#1933)
1 parent 85052fb commit 6cb93ba

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/utils_types.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,15 @@ function set_dsBB(D, all_bbs::Bool=true)
541541
return D
542542
end
543543

544-
# ---------------------------------------------------------------------------------------------------
545544
function set_dsBB!(D, all_bbs::Bool=true)
545+
_set_dsBB!(wrapDatasets("", D), all_bbs)
546+
end
547+
# ---------------------------------------------------------------------------------------------------
548+
function _set_dsBB!(w::wrapDatasets, all_bbs::Bool)
549+
D = unwrapDatasets(w::wrapDatasets)[2]
546550
# Compute and set the global and individual BoundingBox for a Vector{GMTdataset} + the trivial cases.
547551
# If ALL_BBS is false then assume individual BBs are already knwon.
548-
isempty(D) && return nothing
552+
((D === nothing) || isempty(D)) && return nothing
549553

550554
if (all_bbs) # Compute all BBs
551555
if isa(D, GMTdataset)

0 commit comments

Comments
 (0)