forked from 1b-agent/opencadstudio-upstream
feat(styles): unify the five style managers behind a shared frame
The text/dimension/table/multileader/multiline managers were hand-copied, so their list CRUD kept drifting and breaking: Dimension's New created nothing (#73), new text styles never reached the ribbon dropdown (#74), and several were added with a NULL handle (dropped on DWG save, #67). Collapse the duplicated parts into three shared pieces and leave only the per-manager property editor bespoke: - app/style_ops.rs: one StyleKind-dispatched CRUD layer (new / copy / delete / rename) handling handle allocation, ribbon sync, Table re-key and name-reference rewrites in a single place. - ui/style_manager.rs: the window scaffold — uniform toolbar (New / Copy / Delete on the left, Set Current + Apply on the right), style list and chrome. Each manager now only builds its editor. - ui/style_list.rs: the list row — single click selects, double click starts an inline rename. New capabilities, now consistent across all five: - Copy duplicates the selected style. - Double-click a name to rename it inline. - Right side is always Set Current + Apply (added Table set-current; MLine apply is a documented placeholder until its editor is editable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
9cdb5ea5fd
commit
f2dfd01795
12 files changed
+2113
-1607
No files matched your search
+4
-2
@@ -4,11 +4,10 @@ pub const ROW_H: f32 = 26.0;
|
||||
|
||||
pub mod about;
|
||||
pub mod app_menu;
|
||||
pub mod isolate_popup;
|
||||
pub mod update_notice;
|
||||
pub mod command_line;
|
||||
pub mod cycle_popup;
|
||||
pub mod dimstyle;
|
||||
pub mod isolate_popup;
|
||||
pub mod layers;
|
||||
pub mod layout_manager;
|
||||
pub mod mleaderstyle;
|
||||
@@ -26,10 +25,13 @@ pub mod snap_popup;
|
||||
pub mod statusbar;
|
||||
pub mod statusbar_config;
|
||||
pub mod statusbar_menu;
|
||||
pub mod style_list;
|
||||
pub mod style_manager;
|
||||
pub mod tablestyle;
|
||||
pub mod text_util;
|
||||
pub mod textstyle;
|
||||
pub mod units_popup;
|
||||
pub mod update_notice;
|
||||
|
||||
pub use app_menu::AppMenu;
|
||||
pub use command_line::CommandLine;
|
||||
|
||||
Reference in new issue
Block a user