From e07c69e73df8f91d40aa74e204aaab0e81cd980c Mon Sep 17 00:00:00 2001 From: Gauthier Quesnel Date: Tue, 14 May 2024 16:30:31 +0200 Subject: [PATCH] mod: assign constant default value parameter --- lib/src/project.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/src/project.cpp b/lib/src/project.cpp index 76ff015c..463684cf 100644 --- a/lib/src/project.cpp +++ b/lib/src/project.cpp @@ -254,12 +254,14 @@ static auto make_tree_leaf(simulation_copy& sc, case constant::init_type::incoming_component_all: { irt_auto(nb, get_incoming_connection(sc.mod, parent)); - dyn.default_value = nb; + gen.children_parameters[ch_idx].reals[0] = nb; + dyn.default_value = nb; } break; case constant::init_type::outcoming_component_all: { irt_auto(nb, get_outcoming_connection(sc.mod, parent)); - dyn.default_value = nb; + gen.children_parameters[ch_idx].reals[0] = nb; + dyn.default_value = nb; } break; case constant::init_type::incoming_component_n: { @@ -268,7 +270,8 @@ static auto make_tree_leaf(simulation_copy& sc, return new_error(project::part::tree_nodes); irt_auto(nb, get_incoming_connection(sc.mod, parent, id)); - dyn.default_value = nb; + gen.children_parameters[ch_idx].reals[0] = nb; + dyn.default_value = nb; } break; case constant::init_type::outcoming_component_n: { @@ -277,7 +280,8 @@ static auto make_tree_leaf(simulation_copy& sc, return new_error(project::part::tree_nodes); irt_auto(nb, get_outcoming_connection(sc.mod, parent, id)); - dyn.default_value = nb; + gen.children_parameters[ch_idx].reals[0] = nb; + dyn.default_value = nb; } break; } }