Add a User Preferences page for six command-only settings

Zoom direction and factor, whether TEXTEDIT ends after one object, whether
continued dimensions inherit the base dimension's style, which points QDIM
measures from, and which annotative objects pick up a newly set scale. All
six work today; none had a control.

Two of them needed their meaning worked out rather than copied.

ANNOAUTOSCALE stores the mode in the magnitude and on/off in the sign, and
the four modes are not documented anywhere in the app — the command prompt
just says `[-4..4]`. Reading `add_annotation_scale_to_objects` gives them:
1 skips layers that are off, frozen, locked or frozen in the viewport, 2
keeps the locked ones, 3 skips only locked, 4 takes everything. The dropdown
names them instead of showing bare numbers, and choosing Off negates rather
than zeroing, so the mode survives being switched off and back on — which is
the convention the status-bar pill already follows.

The QDIM origin priority had no system variable at all; it could only be
reached through a keyword inside the running command.

Drawing units stay in their own dialog; this page links to it.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-10 08:29:48 +03:00
1 parent a0027a8977
commit 9c3f3625da
4 files changed
+218

No files matched your search

+12
View File
@@ -2017,6 +2017,18 @@ pub enum Message {
ClipromptLinesChanged(i32),
/// Change how long command-line history lines stay visible (COMMANDLINEFADETIME).
CommandLineFadeChanged(i32),
/// Toggle reversing the mouse-wheel zoom direction (ZOOMWHEEL).
ZoomWheelReversedChanged(bool),
/// Change how far one wheel notch zooms (ZOOMFACTOR, 3..=100).
ZoomFactorChanged(i32),
/// Toggle TEXTEDIT ending after one object (TEXTEDITMODE).
TextEditModeChanged(bool),
/// Toggle continued dimensions inheriting the base style (DIMCONTINUEMODE).
DimContinueModeChanged(bool),
/// Change which points QDIM measures from (0 endpoints, 1 intersections).
QdimSnapPriorityChanged(u8),
/// Change which annotative objects pick up a new scale (ANNOAUTOSCALE).
AnnoAutoScaleChanged(i8),
/// Restore Model Space display/canvas appearance to defaults.
RestoreModelSpaceDisplayDefaults,
/// Restore Selection visual effect settings to defaults.
+43
View File
@@ -6223,6 +6223,49 @@ impl OpenCADStudio {
Task::none()
}
Message::ZoomWheelReversedChanged(reversed) => {
self.zoom_wheel_reversed = reversed;
self.persist_settings_if_changed();
Task::none()
}
Message::ZoomFactorChanged(factor) => {
self.zoom_factor = factor.clamp(3, 100);
self.persist_settings_if_changed();
Task::none()
}
Message::TextEditModeChanged(single) => {
self.texteditmode = single;
self.persist_settings_if_changed();
Task::none()
}
Message::DimContinueModeChanged(inherit) => {
self.dimension_continue_mode = i16::from(inherit);
self.persist_settings_if_changed();
Task::none()
}
Message::QdimSnapPriorityChanged(priority) => {
self.quick_dimension_snap_priority = priority.min(1);
self.persist_settings_if_changed();
Task::none()
}
// The sign carries on/off and the magnitude the mode, so switching
// off and back on has to return to the mode that was chosen — the
// same convention the status-bar pill uses when it negates.
Message::AnnoAutoScaleChanged(mode) => {
self.annotation_auto_scale = if mode == 0 {
-self.annotation_auto_scale.abs().max(1)
} else {
mode.clamp(1, 4)
};
self.persist_settings_if_changed();
Task::none()
}
Message::PickDragRectToggled(rectangle) => {
self.pick_drag_rect = rectangle;
self.persist_settings_if_changed();
+6
View File
@@ -198,6 +198,12 @@ impl OpenCADStudio {
textfill: crate::scene::text::sdf_atlas::textfill(),
cliprompt_lines: self.cliprompt_lines,
commandline_fade_ms: self.commandline_fade_ms,
zoom_wheel_reversed: self.zoom_wheel_reversed,
zoom_factor: self.zoom_factor,
texteditmode: self.texteditmode,
dimension_continue_mode: self.dimension_continue_mode,
qdim_snap_priority: self.quick_dimension_snap_priority,
annotation_auto_scale: self.annotation_auto_scale,
},
self.double_click_block_refedit,
self.double_click_block_attedit,