Skip to content

Commit 630d4ad

Browse files
author
Jon Vegard Venås
committed
Fix introduced bug
1 parent 4beb9a4 commit 630d4ad

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/src/library/public.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ GUI
2020
save_results
2121
set_colors
2222
set_icons
23+
create_descriptive_names
24+
get_descriptive_names
2325
```

src/setup_GUI.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function create_makie_objects(vars::Dict, design::EnergySystemDesign)
358358
end
359359
poly!(
360360
ax,
361-
countries;
361+
boundary;
362362
color = :honeydew,
363363
colormap = :dense,
364364
strokecolor = :gray50,

src/utils_GUI/GUI_utils.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,7 @@ function update_available_data_menu!(gui::GUI, element)
579579
available_data = get_available_data(gui)
580580
container = available_data[element]
581581
container_strings = create_label.(container)
582-
if !isempty(container) # needed to resolve bug introduced in Makie
583-
get_menu(gui, :available_data).options = zip(container_strings, container)
584-
end
582+
get_menu(gui, :available_data).options = zip(container_strings, container)
585583
end
586584

587585
"""

src/utils_GUI/results_axis_utils.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ function add_description!(
119119
data_type = nameof(typeof(data))
120120
name_field = "$name.$data_type"
121121
key_str_field = "$key_str.$data_type"
122+
ext_selection = deepcopy(selection)
123+
if isa(data, Resource)
124+
push!(ext_selection, data)
125+
end
122126
add_description!(
123-
data, name_field, key_str_field, pre_desc, selection, available_data, gui,
127+
data, name_field, key_str_field, pre_desc, ext_selection, available_data, gui,
124128
)
125129
end
126130
end
@@ -148,7 +152,7 @@ function add_description!(
148152
available_data::Vector{PlotContainer},
149153
gui::GUI,
150154
)
151-
structure = get_nth_field(key_str, '.', 3)
155+
structure = get_nth_field(key_str, '.', 4)
152156
if structure == "to" || structure == "from" # don't add `to` and `from` fields
153157
return nothing
154158
end

0 commit comments

Comments
 (0)