Merge pull request #1744 from ramox81/codex/layout-first-open-followups

Layouts: first opening follows the page setup; viewports picked by their frame
This commit is contained in:
Hakan Seven committed 2026-10-14 08:54:19 +03:00
commit 86df079182
8 files changed
+132 -6

No files matched your search

+6
View File
@@ -80,6 +80,12 @@ impl OpenCADStudio {
visual_styles: visual_styles.into_iter().map(|(name, _)| name).collect(),
live_sections: live_sections.into_iter().map(|(name, _)| name).collect(),
sheet_viewports,
// PICKBOX pixels in sheet units, at the sheet camera's zoom.
sheet_pick_tolerance: {
let height = scene.camera.borrow().ortho_size() as f64 * 2.0;
let (_, pixels) = scene.selection.borrow().view.vp_size;
f64::from(self.pick_box) * height / f64::from(pixels).max(1.0)
},
}
}
+1
View File
@@ -6784,6 +6784,7 @@ properties={:.1}ms picked={}",
.as_ref()
.map(|style| style.name.clone())
.unwrap_or_default();
self.tabs[i].scene.new_layout_plot_style = plot_style.clone();
for obj in self.tabs[i].scene.document.objects.values_mut() {
if let codec::objects::ObjectType::Layout(l) = obj {
if l.name == new_name {