diff --git a/src/app/commands/attdef.rs b/src/app/commands/attdef.rs index ff5dabea1..446b22e81 100644 --- a/src/app/commands/attdef.rs +++ b/src/app/commands/attdef.rs @@ -288,6 +288,8 @@ impl OpenCADStudio { session.annotative = spec.annotative; session.on_screen = state.on_screen; } + // The choice is kept with the user settings, as the reference keeps it. + self.persist_settings_if_changed(); self.reset_command_start_state(i); if state.align_below { let previous = attdef::session().last.clone(); diff --git a/src/app/settings.rs b/src/app/settings.rs index f4a62191c..c1a60ea3b 100644 --- a/src/app/settings.rs +++ b/src/app/settings.rs @@ -369,6 +369,8 @@ pub struct UserSettings { /// IMAGEFRAME of the profile: used by new drawings and by drawings that /// carry no image variables of their own. pub image_frame: i16, + /// The Attribute Definition dialog's "Specify on-screen" choice. + pub attdef_on_screen: bool, /// Nested-copy symbol handling: false inserts, true binds. pub ncopy_bind: bool, /// Last Options page; unknown saved names fall back without rejecting the config. @@ -657,6 +659,7 @@ impl Default for UserSettings { right_click_hold_ms: 250, grip_object_limit: DEFAULT_GRIP_OBJECT_LIMIT, image_frame: 1, + attdef_on_screen: true, ncopy_bind: false, cursor_type: CursorType::Crosshair, crosshair_color: None, diff --git a/src/app/update/file.rs b/src/app/update/file.rs index bf54ca175..d1407d8d6 100644 --- a/src/app/update/file.rs +++ b/src/app/update/file.rs @@ -676,6 +676,7 @@ impl OpenCADStudio { right_click_hold_ms: self.right_click_hold_ms, grip_object_limit: self.grip_object_limit, image_frame: crate::scene::frame::profile_image_mode(), + attdef_on_screen: crate::modules::draw::draw::attdef::session().on_screen, ncopy_bind: self.ncopy_bind, cursor_type: self.cursor_type, crosshair_color: self.crosshair_color, @@ -761,6 +762,7 @@ impl OpenCADStudio { self.right_click_hold_ms = super::super::settings::clamp_right_click_hold_ms(s.right_click_hold_ms); self.grip_object_limit = s.grip_object_limit.clamp(0, 32767); crate::scene::frame::set_profile_image_mode(s.image_frame); + crate::modules::draw::draw::attdef::session().on_screen = s.attdef_on_screen; self.ncopy_bind = s.ncopy_bind; self.cursor_type = s.cursor_type; self.crosshair_color = s.crosshair_color;