Improve implementation of backend(pkg::AbstractBackend)
This commit is contained in:
parent
9aa1fd5c00
commit
f1719d6e91
@ -188,20 +188,13 @@ Set the plot backend.
|
|||||||
"""
|
"""
|
||||||
function backend(pkg::AbstractBackend)
|
function backend(pkg::AbstractBackend)
|
||||||
sym = backend_name(pkg)
|
sym = backend_name(pkg)
|
||||||
if sym in _initialized_backends
|
if !(sym in _initialized_backends)
|
||||||
CURRENT_BACKEND.sym = backend_name(pkg)
|
_initialize_backend(pkg)
|
||||||
CURRENT_BACKEND.pkg = pkg
|
push!(_initialized_backends, sym)
|
||||||
else
|
|
||||||
# try
|
|
||||||
_initialize_backend(pkg)
|
|
||||||
push!(_initialized_backends, sym)
|
|
||||||
CURRENT_BACKEND.sym = backend_name(pkg)
|
|
||||||
CURRENT_BACKEND.pkg = pkg
|
|
||||||
# catch
|
|
||||||
# add_backend(sym)
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
backend()
|
CURRENT_BACKEND.sym = sym
|
||||||
|
CURRENT_BACKEND.pkg = pkg
|
||||||
|
pkg
|
||||||
end
|
end
|
||||||
|
|
||||||
function backend(sym::Symbol)
|
function backend(sym::Symbol)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user