Skip to content
Snippets Groups Projects
Commit 411abf2a authored by François  LAURENT's avatar François LAURENT
Browse files

good-enough(?) approx. of #55

parent faea50c3
No related branches found
No related tags found
No related merge requests found
Pipeline #86166 passed
......@@ -147,14 +147,30 @@ function tryopenfile(controller, path; reload::Bool=false)
:stop => :stop_large,
:stop_weak => :stop_large,
:stop_strong => :stop_large,
:bend => :cast_large,
:crawl => :run_large,
:BACK => :back_large,
:BEND => :cast_large,
:HUNCH => :hunch_large,
:ROLL => :roll_large,
:RUN => :run_large,
:STOP => :stop_large,
)
fallback_color = theme[:LarvaPlot][:fallback_color]
existingtags = records.tags
apply_default_convention = false
for tag in existingtags
active = tag in keys(default_convention)
tag′= active ? tag : get(related_tags, tag, tag)
if tag in keys(default_convention)
apply_default_convention = true
break
end
end
for tag in existingtags
active′= tag in keys(default_convention)
tag′= active′ ? tag : get(related_tags, tag, tag)
color = get(default_convention, tag′, fallback_color)
original = TagModel(tag)
active = !apply_default_convention || active′
push!(tag_lut, ObservableTag(original; color=color, active=active))
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment