Merge remote-tracking branch 'origin/main' into codex/sheet-set-manager

# Conflicts:
#	Cargo.lock
#	src/app/control/actions.rs
#	src/ui/window/field_dialog.rs
This commit is contained in:
ramox81 committed 2026-10-05 09:20:40 +03:00
commit 1696316e1f
95 files changed
+4269 -722

No files matched your search

+4
View File
@@ -77,6 +77,10 @@ impl OpenCADStudio {
BlockPaletteMsg::ToggleOptions => {
self.block_palette.options_collapsed ^= true;
}
// Browsers expose no folder picker.
#[cfg(target_arch = "wasm32")]
BlockPaletteMsg::LibraryBrowse => {}
#[cfg(not(target_arch = "wasm32"))]
BlockPaletteMsg::LibraryBrowse => {
return Task::perform(
async {
+3 -19
View File
@@ -120,25 +120,9 @@ pub(super) fn on_ribbon_tool_click(&mut self, tool_id: String, event: ModuleEven
self.ribbon.note_panel_tool(&tool_id);
self.ribbon.activate_tool(&tool_id);
match event {
ModuleEvent::Command(cmd) => {
let task = self.dispatch_command(&cmd);
// One-shot tools (view changes, clipboard, toggles,
// audits…) leave nothing running: no interactive
// command and no dialog. Their highlight would stick
// forever — turn it off now. Interactive commands and
// dialog owners keep theirs; the command end / modal
// close clears those. (#355)
let i = self.active_tab;
if self.tabs[i].active_cmd.is_none()
&& self.active_modal.is_none()
&& !self.tabs[i].pan_mode
&& !self.tabs[i].orbit_mode
&& !self.tabs[i].zoom_dynamic_mode
{
self.ribbon.deactivate_tool();
}
return task;
}
// `dispatch_command` turns a one-shot tool's highlight off
// again once nothing is left running (#355).
ModuleEvent::Command(cmd) => return self.dispatch_command(&cmd),
ModuleEvent::OpenFileDialog => {
self.command_line
.push_info(crate::t!("Open DWG/DXF: not yet implemented.").as_ref());
+19 -1
View File
@@ -659,6 +659,7 @@ impl OpenCADStudio {
crate::app::settings::UserSettings {
spacemouse: self.spacemouse_preferences,
dyn_input: self.dyn_input,
dyn_mode: self.dyn_mode,
polar: self.polar_mode,
polar_increment_deg: self.polar_increment_deg,
zoom_wheel_reversed: self.zoom_wheel_reversed,
@@ -750,7 +751,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 = 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;
@@ -3768,7 +3770,20 @@ impl OpenCADStudio {
task
}
/// A plot gives its fields (PlotDate) the plot time, as the reference
/// stores it; the hosts are redrawn before the plot reads the scene.
pub(in crate::app) fn stamp_plot_fields(&mut self) {
let i = self.active_tab;
let hosts = crate::entities::field::stamp_plot_fields(&mut self.tabs[i].scene.document);
if !hosts.is_empty() {
let changes: Vec<_> = hosts.into_iter().map(|h| (h, crate::scene::ChangeKind::Modified)).collect();
self.tabs[i].scene.bump_entities(&changes);
self.tabs[i].dirty = true;
}
}
fn print_all_pages(&mut self) -> Result<Vec<crate::io::pdf_export::PdfPageInput>, String> {
self.stamp_plot_fields();
let available = self.tabs[self.active_tab].scene.layout_names();
let selected: Vec<String> = self
.print_all_layouts
@@ -5341,6 +5356,9 @@ impl OpenCADStudio {
}
self.active_modal = None;
self.reset_modal_geometry();
if !preview {
self.stamp_plot_fields();
}
// Extents, Window and Display use one plot path in both spaces. Only
// Paper-space Layout is special: it uses the physical sheet bounds.
+1 -1
View File
@@ -4197,7 +4197,7 @@ impl OpenCADStudio {
Task::none()
}
Message::ToggleDynInput => {
self.dyn_input ^= true;
self.set_dyn_input(!self.dyn_input);
Task::none()
}
Message::ToggleViewCube => {