feat(ui): offer a cube navigator alongside signed axes (#664)
Adds a View navigator preference (Navigation page) with an optional cube navigator alongside the signed axes, which stay the default (#165).
This commit is contained in:
1 parent
aa24d9f071
commit
7b34d57b25
15 files changed
+1344
-93
No files matched your search
@@ -95,7 +95,12 @@ pub fn handle(app: &mut SolveApp, ctx: &egui::Context, req: &ControlRequest) ->
|
||||
let Some(id) = s("command").or(s("id")) else { return err("missing `command`") };
|
||||
let params = p.get("params").cloned().filter(|v| !v.is_null()).unwrap_or(json!({}));
|
||||
let r = app.run(id, params);
|
||||
if r.is_ok() && app.session.active_sketch.is_none() && app.session.world_state().bodies.len() == 1 && app.session.undo.len() <= 2 {
|
||||
if r.is_ok()
|
||||
&& id != "view.navigate"
|
||||
&& app.session.active_sketch.is_none()
|
||||
&& app.session.world_state().bodies.len() == 1
|
||||
&& app.session.undo.len() <= 2
|
||||
{
|
||||
app.fit_view();
|
||||
}
|
||||
// After the first-body fit, so a camera the command asked for (`view.apply`) wins.
|
||||
|
||||
Reference in new issue
Block a user