forked from 1b-agent/opencadstudio-upstream
feat(field): table formula buttons, block placeholders, attribute fields on insert, plot-time field stamping
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b8def31145
commit
785db5683b
31 files changed
+522
-12
No files matched your search
@@ -3764,7 +3764,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
|
||||
@@ -5337,6 +5350,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.
|
||||
|
||||
Reference in new issue
Block a user