Merge PR #1574 from ramox81/codex/attdef-parity: ATTDEF dialog, -ATTDEF, tag display, Properties and Block Definition ribbon

Conflicts with #1573: the locale files and the catalog take both PRs'
entries (one "Insertion Point" mapping kept); the Home and Insert Block
panels take #1574's layout with #1573's Insert Block gallery.
This commit is contained in:
Hakan Seven committed 2026-10-02 10:17:54 +03:00
commit a1d0cf3873
47 files changed
+2970 -490

No files matched your search

File diff suppressed because it is too large. Load diff
+6 -2
View File
@@ -31,7 +31,7 @@ impl CadModule for DrawModule {
use crate::modules::annotate::{
angular_dim, leader_cmd, linear_dim, mleader_cmd, mtext, radius_dim, text,
};
use crate::modules::insert::{create_block, insert_block};
use crate::modules::insert::{attedit, create_block, edit_block, insert_block};
use clipboard::{copy_clip, cut, paste};
use draw::{arc, circle, ellipse, hatch, line, polyline, shapes};
use groups::{group, ungroup};
@@ -200,9 +200,13 @@ impl CadModule for DrawModule {
},
RibbonGroup {
title: "Block",
// Slide-out: Define / Manage / Synchronize Attributes and
// Set Base Point.
tools: vec![
RibbonItem::LargeTool(create_block::tool()),
insert_block::gallery(),
RibbonItem::Tool(create_block::tool()),
RibbonItem::Tool(edit_block::tool()),
RibbonItem::Tool(attedit::tool()),
],
},
RibbonGroup {
-10
View File
@@ -1,10 +0,0 @@
use crate::modules::{IconKind, ModuleEvent, ToolDef};
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attsync.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "ATTSYNC",
label: "Synchronize",
icon: ICON,
event: ModuleEvent::Command("ATTSYNC".to_string()),
}
}
-11
View File
@@ -1,19 +1,8 @@
use crate::t;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use glam::DVec3;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/base_point.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "BASE",
label: "Set Base\nPoint",
icon: ICON,
event: ModuleEvent::Command("BASE".to_string()),
}
}
// ── Command implementation ────────────────────────────────────────────────
/// Picks one point and delegates to the inline `BASE <x> <y> <z>` handler,
+29 -11
View File
@@ -1,14 +1,13 @@
// Insert module — references, point clouds, blocks, attributes, import, content.
mod attdef;
mod attedit;
pub(crate) mod attedit;
mod attman;
mod attsync;
pub mod base_point;
mod content_browser;
pub(crate) mod create_block;
mod design_center;
mod edit_block;
pub(crate) mod edit_block;
pub(crate) mod image_transparency;
pub(crate) mod insert_block;
mod landxml;
@@ -106,19 +105,38 @@ impl CadModule for InsertModule {
tools: vec![
RibbonItem::LargeTool(mview_block::tool()),
insert_block::gallery(),
RibbonItem::Tool(create_block::tool()),
RibbonItem::Tool(edit_block::tool()),
RibbonItem::Tool(base_point::tool()),
RibbonItem::LabeledDropdown {
id: "ATTEDIT_DROPDOWN",
label: "Edit Attribute",
icon: attedit::ICON,
items: vec![
("ATTEDIT", "Single", attedit::ICON),
("-ATTEDIT", "Multiple", attedit::ICON),
],
default: "ATTEDIT",
},
// ATTMODE: the face shows the drawing's current setting.
RibbonItem::LabeledDropdown {
id: "ATTMODE_DROPDOWN",
label: "",
icon: attedit::ICON,
items: vec![
("ATTMODE1", "Retain Attribute Display", attedit::ICON),
("ATTMODE2", "Display All Attributes", attedit::ICON),
("ATTMODE0", "Hide All Attributes", attedit::ICON),
],
default: "ATTMODE1",
},
],
},
// ── Attributes ────────────────────────────────────────────────────
// ── Block Definition (slide-out: Set Base Point, Synchronize) ─────
RibbonGroup {
title: "Attributes",
title: "Block Definition",
tools: vec![
RibbonItem::LargeTool(create_block::tool()),
RibbonItem::LargeTool(attdef::tool()),
RibbonItem::LargeTool(attedit::tool()),
RibbonItem::Tool(attman::tool()),
RibbonItem::Tool(attsync::tool()),
RibbonItem::LargeTool(attman::tool()),
RibbonItem::LargeTool(edit_block::tool()),
],
},
// ── Import ────────────────────────────────────────────────────────