2727 name::String,
2828 key_str::String,
2929 pre_desc::String,
30- element ,
30+ selection::Vector ,
3131 available_data::Vector{Dict},
3232 gui::GUI,
3333 )
@@ -39,14 +39,14 @@ function add_description!(
3939 name:: String ,
4040 key_str:: String ,
4141 pre_desc:: String ,
42- element ,
42+ selection :: Vector ,
4343 available_data:: Vector{Dict} ,
4444 gui:: GUI ,
4545)
4646 container = Dict (
4747 :name => name,
4848 :is_jump_data => false ,
49- :selection => [element] ,
49+ :selection => selection ,
5050 :field_data => field,
5151 :description => create_description (gui, key_str; pre_desc),
5252 )
5959 name::String,
6060 key_str::String,
6161 pre_desc::String,
62- element ,
62+ selection::Vector ,
6363 available_data::Vector{Dict},
6464 gui::GUI,
6565 )
@@ -72,15 +72,23 @@ function add_description!(
7272 name:: String ,
7373 key_str:: String ,
7474 pre_desc:: String ,
75- element ,
75+ selection :: Vector ,
7676 available_data:: Vector{Dict} ,
7777 gui:: GUI ,
7878)
7979 for (dictname, dictvalue) ∈ field
80- name_field = " $name .$dictname "
81- key_str_field = " $key_str .$dictname "
80+ name_field = " $name "
81+ key_str_field = " $key_str "
82+ ext_selection = deepcopy (selection)
83+ if isa (dictname, Resource)
84+ push! (ext_selection, dictname)
85+ else
86+ name_field *= " .$dictname "
87+ key_str_field *= " .$dictname "
88+ end
8289 add_description! (
83- dictvalue, name_field, key_str_field, pre_desc, element, available_data, gui,
90+ dictvalue, name_field, key_str_field, pre_desc, ext_selection, available_data,
91+ gui,
8492 )
8593 end
8694end
9199 name::String,
92100 key_str::String,
93101 pre_desc::String,
94- element ,
102+ selection::Vector ,
95103 available_data::Vector{Dict},
96104 gui::GUI,
97105 )
@@ -104,7 +112,7 @@ function add_description!(
104112 name:: String ,
105113 key_str:: String ,
106114 pre_desc:: String ,
107- element ,
115+ selection :: Vector ,
108116 available_data:: Vector{Dict} ,
109117 gui:: GUI ,
110118)
@@ -113,7 +121,7 @@ function add_description!(
113121 name_field = " $name .$data_type "
114122 key_str_field = " $key_str .$data_type "
115123 add_description! (
116- data, name_field, key_str_field, pre_desc, element , available_data, gui,
124+ data, name_field, key_str_field, pre_desc, selection , available_data, gui,
117125 )
118126 end
119127end
@@ -137,7 +145,7 @@ function add_description!(
137145 name:: String ,
138146 key_str:: String ,
139147 pre_desc:: String ,
140- element ,
148+ selection :: Vector ,
141149 available_data:: Vector{Dict} ,
142150 gui:: GUI ,
143151)
@@ -153,7 +161,7 @@ function add_description!(
153161 pre_desc_sub = " $pre_desc$name_field_type : "
154162 key_str = " structures.$name_field_type .$sub_field_name "
155163 add_description! (
156- sub_field, name_field, key_str, pre_desc_sub, element , available_data, gui,
164+ sub_field, name_field, key_str, pre_desc_sub, selection , available_data, gui,
157165 )
158166 end
159167end
@@ -305,22 +313,20 @@ function create_label(selection::Dict{Symbol,Any})
305313 label *= selection[:name ]
306314 end
307315 otherRes:: Bool = false
308- if length (selection) > 1
309- for select ∈ selection[:selection ]
310- if isa (select, Resource)
311- if ! otherRes
312- label *= " ("
313- otherRes = true
314- end
315- label *= " $(select) "
316- if select != selection[:selection ][end ]
317- label *= " , "
318- end
316+ for select ∈ selection[:selection ]
317+ if isa (select, Resource)
318+ if ! otherRes
319+ label *= " ("
320+ otherRes = true
321+ end
322+ label *= " $(select) "
323+ if select != selection[:selection ][end ]
324+ label *= " , "
319325 end
320326 end
321- if otherRes
322- label *= " ) "
323- end
327+ end
328+ if otherRes
329+ label *= " ) "
324330 end
325331 return label
326332end
0 commit comments