forked from 1b-agent/opencadstudio-upstream
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:
1 parent
a0027a8977
commit
9c3f3625da
4 files changed
+218
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user