fix(pointstyle): stage dialog edits until accepted

Keep PDMODE and PDSIZE changes in the Point Style dialog until OK. Cancel and close discard staged edits. Invalid or non-finite size input reports an error and keeps the dialog open. Commit both values with one undo snapshot.

test: cancel discards staged glyph and size edits

test: invalid point size reports error and stays open

test: OK commits glyph and size in one undo step

test: relative point size keeps its sign
This commit is contained in:
Karim Jerbi committed 2026-10-18 09:21:43 +01:00
1 parent 248c9aec7b
commit c0baeda6a6
6 files changed
+214 -44

No files matched your search

+8 -2
View File
@@ -194,7 +194,13 @@ pub fn view_window<'a>(
]
.spacing(6);
let ok = dialog_button(t!("OK"), Message::PointStyleOk, true);
let actions = row![
Space::new().width(width),
dialog_button(t!("OK"), Message::PointStyleOk, true),
dialog_button(t!("Cancel"), Message::CloseModal, false),
]
.spacing(8)
.align_y(iced::Center);
container(
column![
@@ -206,7 +212,7 @@ pub fn view_window<'a>(
Space::new().height(8),
radios,
Space::new().height(12),
row![Space::new().width(width), ok].width(width),
actions.width(width),
]
.spacing(4)
.padding(20)