Skip to content

Commit

Permalink
mod: assign constant default value parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed May 14, 2024
1 parent a79b0f1 commit e07c69e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/src/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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: {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit e07c69e

Please sign in to comment.