forked from 1b-agent/opencadstudio-upstream
Merge pull request #1613 from ramox81/codex/sheet-set-manager
Sheet Set Manager, NEWSHEETSET / OPENSHEETSET and sheet set fields, with review fixes. # Conflicts: # Cargo.lock # src/app/control/actions.rs # src/app/mod.rs # src/app/settings.rs # src/app/update/dialog.rs # src/app/update/file.rs # src/app/update/mod.rs # src/app/view/mod.rs # src/ui/dock.rs # src/ui/ribbon/mod.rs # src/ui/window/field_dialog.rs # src/ui/window/mod.rs
This commit is contained in:
commit
fbe55bab37
52 files changed
+9088
-69
No files matched your search
@@ -37,6 +37,7 @@ pub use page_setup::{apply_default_page_setup, document_page_setups, rotated_mar
|
||||
mod dwg_native_constraints;
|
||||
mod entity;
|
||||
pub use entity::CreateBlockOptions;
|
||||
pub use camera_ops::named_view_center;
|
||||
#[cfg(test)]
|
||||
mod hatch_boundary;
|
||||
mod group_layer;
|
||||
@@ -4561,6 +4562,22 @@ impl Scene {
|
||||
self.current_layout_block_handle()
|
||||
}
|
||||
|
||||
/// A unique id for a new viewport on the current layout: one past the
|
||||
/// largest id there, at least 2 (1 is the layout's own paper viewport).
|
||||
pub fn next_viewport_id(&self) -> i16 {
|
||||
let layout_block = self.current_layout_block_handle();
|
||||
let max_id = self
|
||||
.document
|
||||
.entities()
|
||||
.filter_map(|e| match e {
|
||||
codec::EntityType::Viewport(v) if v.common.owner_handle == layout_block => Some(v.id),
|
||||
_ => None,
|
||||
})
|
||||
.max()
|
||||
.unwrap_or(1);
|
||||
(max_id + 1).max(2)
|
||||
}
|
||||
|
||||
/// True when an entity belongs to the active layout, including imported
|
||||
/// DXF entities whose owner handle is NULL but whose BlockRecord still
|
||||
/// lists the entity. Keep command validation aligned with the same
|
||||
|
||||
Reference in new issue
Block a user