Merge branch 'main' into feature/parametric-constraint-system

# Conflicts:
#	src/app/automation.rs
#	src/app/mod.rs
#	src/ui/ribbon/widgets.rs
This commit is contained in:
Felix Riestra committed 2026-09-09 13:35:07 +02:00
commit e2d39b049d
114 files changed
+13641 -1685

No files matched your search

+24
View File
@@ -265,6 +265,11 @@ impl OpenCADStudio {
self.control_observe_user_message(&msg);
let perf_started = crate::perf::enabled().then(Instant::now);
let perf_label = perf_message_label(&msg);
// Keep the stable tab id because dispatch may switch or close tabs.
let perf_edit_before = perf_started.map(|started| {
let tab = &self.tabs[self.active_tab];
(started, tab.id, tab.scene.geometry_epoch)
});
// A modal dialog must capture the keyboard the same way it already
// captures the mouse. Otherwise keystrokes from the global key
// subscription leak past the modal into the command line and fire as
@@ -324,6 +329,17 @@ impl OpenCADStudio {
self.otrack_active = None;
self.otrack_kind = None;
}
if let Some((started, tab_id, before)) = perf_edit_before {
if let Some(tab) = self.tabs.iter().find(|tab| tab.id == tab_id) {
if tab.scene.geometry_epoch != before {
tab.scene.record_nav_perf_caused(
crate::scene::NavPerfOp::Edit,
perf_label,
started,
);
}
}
}
if let Some(started) = perf_started {
let elapsed_ms = started.elapsed().as_secs_f64() * 1000.0;
if elapsed_ms >= 5.0 {
@@ -1953,6 +1969,14 @@ impl OpenCADStudio {
self.dispatch_command(&cmd)
}
Message::ScriptLine(line) => {
if line.trim().is_empty() {
self.feed_command(crate::command::StepInput::Enter)
} else {
self.run_command_line(&line)
}
}
Message::ToggleLayers => {
if self.active_modal == Some(super::ModalKind::Layers) {
self.ribbon.deactivate_tool_if("LAYERS");