forked from StudioInfinity/dyna3
Nudge from initial step of failed realization
This commit is contained in:
parent
36036141b5
commit
43a65eba65
1 changed files with 5 additions and 5 deletions
|
@ -597,16 +597,16 @@ pub fn Display() -> View {
|
|||
|status| status.is_ok()
|
||||
);
|
||||
let step_val = state.assembly.step.with_untracked(|step| step.value);
|
||||
let on_init_step = step_val.is_some_and(|n| n == 0.0);
|
||||
let on_last_step = step_val.is_some_and(
|
||||
|n| state.assembly.descent_history.with_untracked(
|
||||
|history| n as usize + 1 == history.config.len().max(1)
|
||||
)
|
||||
);
|
||||
if
|
||||
state.selection.with(|sel| sel.len() == 1)
|
||||
&& realization_successful
|
||||
&& on_last_step
|
||||
{
|
||||
let on_manipulable_step =
|
||||
!realization_successful && on_init_step
|
||||
|| realization_successful && on_last_step;
|
||||
if on_manipulable_step && state.selection.with(|sel| sel.len() == 1) {
|
||||
let sel = state.selection.with(
|
||||
|sel| sel.into_iter().next().unwrap().clone()
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue