Skip to content
Snippets Groups Projects
Commit ef0dc4d4 authored by xo30xoqa's avatar xo30xoqa
Browse files

Fixed a bug in map loading, bumped to v0.2.1

parent ea52e577
No related branches found
No related tags found
No related merge requests found
......@@ -1239,9 +1239,9 @@ version = "4.1.6+0"
[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "a028ee3cb5641cccc4c24e90c36b0a4f7707bdf5"
git-tree-sha1 = "1b35263570443fdd9e76c76b7062116e2f374ab8"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.14+0"
version = "3.0.15+0"
[[deps.OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
......
name = "PersefoneDesktop"
uuid = "78b50b3d-c6fc-409a-aced-ad0772f04556"
authors = ["Daniel Vedder <daniel.vedder@idiv.de>"]
version = "0.2.0"
version = "0.2.1"
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
......
......@@ -3,15 +3,13 @@
### This file links the QML UI designs to the underlying model.
###
function loadsimulation(filename)
global model, landcovermap
global model
@emit showSplash()
fn = convert(filename, String)
startswith(fn, "file://") && (fn = fn[8:end])
running[] = false
model = loadmodelobject(fn)
landcovermap = rotr90(load(@param(world.landcovermap)))
date[] = model.date
progress[] = (date[]-@param(core.startdate)) /
(@param(core.enddate)-@param(core.startdate))
......@@ -58,7 +56,9 @@ function render_map(screen)
launching[] && return display(screen, Figure().scene) # blank screen at launch
println("Updating map")
if isnothing(mapimage)
landcover = rotr90(load(joinpath(@param(world.mapdirectory), @param(world.landcovermap))))
landcover = rotr90(load(joinpath(pkgdir(@__MODULE__),
@param(world.mapdirectory),
@param(world.landcovermap))))
mapimage = Figure()
ax = Axis(mapimage[1,1])
hidedecorations!(ax)
......
......@@ -4,7 +4,7 @@
###
@resumable function createlaunchfunction()
global model, landcovermap
global model
running[] = false
progress[] = 0.0
@yield 1
......@@ -13,7 +13,6 @@
model.date -= Day(1)
Persefone.outputdata(model, true) # record data before run starts
model.date += Day(1)
landcovermap = rotr90(load(joinpath(@param(world.mapdirectory), @param(world.landcovermap))))
date[] = model.date
launching[] = false
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment