A new empty design takes Units of new designs (#1283)

The empty design shown at launch, New on a design that is still empty, file.new and the blank design left when the last tab closes all take the Units of new designs preference. Opened files and the sample part keep their own units. Fixes #1205.

Co-authored-by: raythurman2386 <raythurman2386@users.noreply.github.com>
This commit is contained in:
Raymond Thurmanandraythurman2386 authored and GitHub committed 2026-10-15 01:20:02 -04:00
1 parent 7391e8ed75
commit af2f09fac2
5 files changed
+74 -6

No files matched your search

+4
View File
@@ -582,6 +582,10 @@ impl SolveApp {
if !(id == "view.navigate" && v.get("continuous").and_then(Value::as_bool) == Some(true)) {
self.session.echo(language.format("ui.command_done", &[("command", label)]));
}
if id == "file.new" {
// `file.new` starts from millimetres. Units of new designs still apply (#1205).
prefs::apply_new_design(self);
}
if matches!(id, "file.new" | "doc.open" | "doc.recover") {
render_workspace::reset_document(self);
self.sketch_choices = sketch_families::Choices::default();