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

+8
View File
@@ -3627,6 +3627,14 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
return Task::none();
}
}
if field.starts_with("att_") {
if let Err(message) =
crate::entities::attribute::validate_definition_property(field, &val)
{
self.command_line.push_error(message);
return Task::none();
}
}
if field.starts_with("ul_") {
if let Err(message) =
crate::entities::underlay::validate_property(field, &val)
+16
View File
@@ -345,6 +345,12 @@ impl OpenCADStudio {
_ => "FRAMES3",
};
self.ribbon.set_dropdown_current("FRAMES_DROPDOWN", current);
let attmode = match tab.scene.document.header.attribute_visibility {
0 => "ATTMODE0",
2 => "ATTMODE2",
_ => "ATTMODE1",
};
self.ribbon.set_dropdown_current("ATTMODE_DROPDOWN", attmode);
}
fn update_message(&mut self, msg: Message) -> Task<Message> {
@@ -1810,6 +1816,7 @@ impl OpenCADStudio {
}
Message::PdfDialog(message) => self.update_pdf_dialog(message),
Message::AttdefDialog(message) => self.on_attdef_dialog(message),
Message::PcManager(message) => self.update_pc_manager(message),
Message::RibbonSelectTab(idx) => {
self.ribbon.select(idx);
@@ -8497,6 +8504,15 @@ impl OpenCADStudio {
}
Message::CloseModal => {
if matches!(
self.active_modal,
Some(super::ModalKind::AttDef | super::ModalKind::AttDefEdit)
) {
self.attdef_dialog = None;
let editing = self.attdef_edit.take().is_some();
self.close_active_modal();
return if editing { self.post_editor_closed(false) } else { Task::none() };
}
// Cancelling the section settings drops the waiting extraction.
if self.active_modal == Some(super::ModalKind::PcSection) {
crate::modules::insert::pc_extract::drop_job();