mirror of https://codeberg.org/topola/topola.git
fix(topola-egui): clamp timestep slider to 0.001-3.0 instead of 0.0-3.0
Timestep should never be set to 0 because this freezes the GUI if the execution takes a long time. Of course, this solution assumes that any lengthy operation is split into sufficiently fine steppable steps. Fixes https://codeberg.org/topola/topola/issues/203
This commit is contained in:
parent
c2bdeb61e4
commit
640247a675
|
|
@ -109,7 +109,7 @@ impl MenuBar {
|
||||||
|
|
||||||
ui.label(tr.text("tr-menu-view-frame-timestep"));
|
ui.label(tr.text("tr-menu-view-frame-timestep"));
|
||||||
ui.add(
|
ui.add(
|
||||||
egui::widgets::Slider::new(&mut self.frame_timestep, 0.0..=3.0)
|
egui::widgets::Slider::new(&mut self.frame_timestep, 0.001..=3.0)
|
||||||
.suffix(" s"),
|
.suffix(" s"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue