BREAKING: KCL @settings are the source of truth for units (#5808)

This commit is contained in:
Jonathan Tran
2025-03-31 10:56:03 -04:00
committed by GitHub
parent eac5abba79
commit efc8c82d8b
237 changed files with 820 additions and 2146 deletions

View File

@ -176,6 +176,10 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
)
.await?;
// Reset to the default units. Modules assume the engine starts in the
// default state.
self.set_units(Default::default(), source_range, id_generator).await?;
// Flush the batch queue, so clear is run right away.
// Otherwise the hooks below won't work.
self.flush_batch(false, source_range).await?;
@ -256,9 +260,6 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
self.set_edge_visibility(settings.highlight_edges, source_range, id_generator)
.await?;
// Change the units.
self.set_units(settings.units, source_range, id_generator).await?;
// Send the command to show the grid.
self.modify_grid(!settings.show_grid, source_range, id_generator)
.await?;