Temporarily suppress Ortho mode during RECTANG commands

This commit is contained in:
Karim Jerbi 2026-06-16 09:53:32 +01:00
commit a431e02378
4 changed files with 25 additions and 1 deletions

View file

@ -1674,13 +1674,18 @@ impl OpenCADStudio {
self.focus_cmd_input()
}
/// Restore the tangent snap state that was in effect before the command started.
/// Restore the tangent-snap / ortho state that was in effect before the command started.
fn restore_pre_cmd_tangent(&mut self) {
if let Some(was_on) = self.pre_cmd_tangent.take() {
if !was_on {
self.snapper.enabled.remove(&crate::snap::SnapType::Tangent);
}
}
if self.rect_suppressed_ortho {
self.rect_suppressed_ortho = false;
self.ortho_mode = true;
self.polar_mode = false;
}
}
}