feat(styles): make style managers transactional — persist only on Apply
A style manager is now a staged transaction. When it opens, a snapshot of the style tables, style objects and current-style pointers is taken. Every New / Copy / Delete / Rename / Set Current / property edit mutates the document live so the dialog previews the result, but the tab is not marked dirty, nothing is pushed to undo, and the drawing is not rebuilt. - Apply commits: one undo entry (restoring the pre-edit state), the tab is marked dirty, the drawing rebuilds, and the baseline is reset so further edits stage afresh. - Closing the window without Apply discards: the opening snapshot is restored, so none of the changes persist. Side effects (dirty / undo / bump_geometry) were removed from every style edit handler and routed exclusively through the commit. Multiline's Apply is a structural-only commit since its editor has no editable properties. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
65a25033bc
commit
de4eb31003
6 changed files with 205 additions and 101 deletions
|
|
@ -3,7 +3,6 @@
|
|||
use crate::app::Message;
|
||||
use iced::widget::{
|
||||
button, checkbox, column, container, pick_list, row, scrollable, text, text_input, Column,
|
||||
Space,
|
||||
};
|
||||
use iced::{Background, Border, Color, Element, Fill, Theme};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue