fix(dynmode): one toggle keeps DYNMODE's sign in step

F12, the drafting dialog and restored settings each re-derived DYNMODE and
lost the mode on the way: F12 off set 0, so on came back as 3 even after
DYNMODE 1. set_dyn_input now makes off negative (temporarily off) and on
restore the stored mode, and the bare query prints the stored value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-03 15:01:45 +03:00
1 parent 92c00ecbe2
commit ba8aed4fad
4 files changed
+20 -25

No files matched your search

+2 -2
View File
@@ -750,8 +750,8 @@ impl OpenCADStudio {
/// Apply restored preferences to live state.
pub(in crate::app) fn apply_settings(&mut self, s: &crate::app::settings::UserSettings) {
self.dyn_input = s.dyn_input;
self.dyn_mode = if s.dyn_mode != 0 { s.dyn_mode } else if s.dyn_input { 3 } else { 0 };
self.dyn_mode = s.dyn_mode;
self.set_dyn_input(s.dyn_input);
self.polar_mode = s.polar;
self.polar_increment_deg = s.polar_increment_deg;
self.zoom_wheel_reversed = s.zoom_wheel_reversed;
+1 -6
View File
@@ -4196,12 +4196,7 @@ impl OpenCADStudio {
Task::none()
}
Message::ToggleDynInput => {
self.dyn_input ^= true;
if self.dyn_input && self.dyn_mode <= 0 {
self.dyn_mode = 3;
} else if !self.dyn_input && self.dyn_mode > 0 {
self.dyn_mode = 0;
}
self.set_dyn_input(!self.dyn_input);
Task::none()
}
Message::ToggleViewCube => {