Skip to content

Commit 1e76971

Browse files
author
Jon Vegard Venås
committed
Implement suggestion from review and add missing input parameter description in docstring of the GUI constructor
1 parent e022232 commit 1e76971

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/setup_GUI.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ to the old EnergyModelsX `case` dictionary.
4242
hovering objects to show information.
4343
- **`use_geomakie::Bool=true`** toggles the use of GeoMakie for plotting geographical
4444
designs when the `case` contains geographical information.
45+
- **`pre_plot_sub_components::Bool=true`** toggles whether or not to pre-plot all
46+
sub-components of areas in the topology design. Setting this to `false` greatly
47+
enhances performance for large cases, as the components of an `Area` are then
48+
plotted on demand (on the `open` functionality).
4549
4650
!!! warning "Reading model results from CSV-files"
4751
Reading model results from a directory (*i.e.*, `model::String` implying that the results

src/utils_GUI/topo_axis_utils.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,13 @@ function get_hover_string(obj::AbstractGUIObj)
714714
element = get_element(obj)
715715
label = get_element_label(element)
716716
inv_times = get_inv_times(obj)
717-
inv_str = "$label ($(nameof(typeof(element))))"
717+
io = IOBuffer()
718+
print(io, "$label ($(nameof(typeof(element))))")
718719
if !isempty(inv_times)
719720
capex = get_capex(obj)
720-
inv_str *= join(["\n\t$t: $(format_number(c))" for (t, c) zip(inv_times, capex)])
721+
for (t, c) zip(inv_times, capex)
722+
print(io, "\n\t", t, ": ", format_number(c))
723+
end
721724
end
722-
return inv_str
725+
return String(take!(io))
723726
end

0 commit comments

Comments
 (0)