Commit Graph
7 Commits
Author SHA1 Message Date
dotCooCoo 4b670b1d53 Keep the Find and Replace match line in sync 2026-11-26 16:07:46 -08:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo efc36481b1 Find and Replace: Find with other Find text starts at the first match
With no place to go on from, the dialog left out edit.findNext's from, so the search went on after the selected type object and passed over its matches: after Find selected a type object, changing the Find text skipped the matches in it. edit.findNext now starts at the first match for a null from, and the dialog sends one.
2026-11-18 01:46:57 -08:00
dotCooCoo d27a9e9466 Find and Replace: an action that is not a string runs no action
Confirming the dialog with a number, null or list as its action used to run Find, which moved the match found, the selection and the last search. It is now an error, shown as the note, like a field of the wrong type.
2026-11-18 01:12:58 -08:00
dotCooCoo 2275ca2fe0 Find and Replace: confirming with a field of the wrong type runs no action
ui.dialog.confirm used to read a replace that is not a string as empty text, so Replace All could delete every match, and a switch that is not true or false as off. It now returns the error, which shows under the match found, and runs nothing; the match stays for Replace once the field is set right.
2026-11-17 22:36:13 -08:00
dotCooCoo d4b1ff8f60 Find and Replace: a dialog field of the wrong type is an error
ui.paramDialog for edit.findReplace used to drop a field of the wrong type, such as a number for find, and open on the last search. It now returns an error and leaves the dialog closed. A null field still gives none, as the menu item's does.
2026-11-17 21:53:34 -08:00
dotCooCoo fb1c4ec562 Edit: Find and Replace steps through matches in a dialog that stays open
Edit > Find and Replace... opens a dialog of its own with Find and
Replace With fields, Match Case, Find Whole Word, Search Backwards,
Check Hidden Layers and Check Locked Layers, and Find, Replace,
Replace & Find, Replace All and Done. Find shows the match in its line
of text with its place among the matches and selects its type object.

edit.findNext returns the match (id, start, end, index, count,
selected) and takes backwards, hiddenLayers, lockedLayers and from.
The new edit.replaceMatch replaces one match as one undo step.
edit.findReplace takes the two layer switches and reports how many
matches it replaced. Ruby after a replaced match moves with the text.
Edit > Find Next goes on from the dialog's last search in the same
document, and is no longer offered as an action step.
2026-11-14 12:00:58 -08:00