ATTDEF: the dialog's Specify on-screen choice is kept with the user settings

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-02 10:39:18 +03:00
1 parent 53f2983e9c
commit efbb1797cd
3 files changed
+7

No files matched your search

+2
View File
@@ -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();
+3
View File
@@ -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,
+2
View File
@@ -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;