Merge pull request #1337 from HakanSeven12/plot/b1-plot-settings-compat

fix(plot): write page setups in the file format's canonical form
This commit is contained in:
Panos authored and GitHub committed 2026-09-17 18:14:17 +03:00
commit 472bb9883d
11 files changed
+16779 -278

No files matched your search

+716 -230
View File
File diff suppressed because it is too large. Load diff
+1 -2
View File
@@ -1508,8 +1508,7 @@ impl OpenCADStudio {
Message::ClearScene => {
let i = self.active_tab;
self.push_undo_snapshot(i, "CLEAR");
self.tabs[i].scene.clear();
crate::io::linetypes::populate_document(&mut self.tabs[i].scene.document);
self.tabs[i].scene.reset_to_new_drawing();
self.tabs[i].properties = PropertiesPanel::empty();
let doc_layers = self.tabs[i].scene.document.layers.clone();
let vp_info = self.tabs[i].scene.viewport_list();
+1 -18
View File
@@ -6033,24 +6033,7 @@ properties={:.1}ms picked={}",
if let acadrust::objects::ObjectType::Layout(l) = obj {
if l.name == new_name {
l.flags = layout_flags;
l.min_limits = (0.0, 0.0);
l.max_limits = (297.0, 210.0);
l.min_extents = (0.0, 0.0, 0.0);
l.max_extents = (297.0, 210.0, 0.0);
l.paper_width = 297.0;
l.paper_height = 210.0;
l.plot_paper_units = 1;
l.plot_scale_numerator = 1.0;
l.plot_scale_denominator = 1.0;
l.plot_scale_type = 16;
l.plot_scale_factor = 1.0;
l.plot_type = 5;
l.plot_flags.use_standard_scale = true;
l.plot_flags.print_lineweights = true;
l.plot_flags.plot_plot_styles = !plot_style.is_empty();
l.plot_flags.show_plot_styles = !plot_style.is_empty();
l.plot_style_sheet = plot_style;
l.paper_size = "ISO_A4_(297.00_x_210.00_MM)".into();
crate::scene::apply_default_page_setup(l, &plot_style);
break;
}
}