feat(tablestyle): add Annotative toggle to the Table Style editor
The table-style details panel gains an Annotative checkbox that flips the new TableStyle.annotative flag, rounding out annotative across the Text, Dimension and Table style editors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
07a2a05975
commit
4675a439da
3 changed files with 24 additions and 1 deletions
|
|
@ -898,6 +898,8 @@ pub enum Message {
|
|||
TableStyleDialogSelect(String),
|
||||
TableStyleDialogNew,
|
||||
TableStyleDialogDelete,
|
||||
/// Toggle the Annotative flag on the selected table style.
|
||||
TableStyleToggleAnnotative,
|
||||
// ── MLineStyle Dialog ─────────────────────────────────────────────────
|
||||
MlStyleDialogOpen,
|
||||
#[allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -5744,6 +5744,22 @@ impl OpenCADStudio {
|
|||
Task::none()
|
||||
}
|
||||
|
||||
Message::TableStyleToggleAnnotative => {
|
||||
use acadrust::objects::ObjectType;
|
||||
let i = self.active_tab;
|
||||
let name = self.tablestyle_selected.clone();
|
||||
self.push_undo_snapshot(i, "TABLESTYLE EDIT");
|
||||
for obj in self.tabs[i].scene.document.objects.values_mut() {
|
||||
if let ObjectType::TableStyle(s) = obj {
|
||||
if s.name == name {
|
||||
s.annotative = !s.annotative;
|
||||
}
|
||||
}
|
||||
}
|
||||
self.tabs[i].dirty = true;
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::TableStyleDialogNew => {
|
||||
use acadrust::objects::ObjectType;
|
||||
let i = self.active_tab;
|
||||
|
|
|
|||
Loading…
Reference in a new issue