Scripts: palette events keep their checks after getters and print questions

- paletteClose with another engine's palette id no longer drops that
  palette's waiting events.
- A hidden palette is not described after a run or an add, so a
  throwing getter on it no longer fails the run; script.palettes and
  docs/mcp.md say a hidden palette lists its controls as they were.
- A check box's click rechecks the box after reading its value, so a
  getter that disables it or closes the palette stops the click.
- A list's change rechecks that the list is still enabled and visible
  after its item texts are read, and is dropped when a getter disabled
  or hid it.
- A waiting palette event does not start its run, or ask for frames,
  while the last run's print jobs wait for their answer.
- script.palette.event's help states that a change merges only after
  its palette's last waiting click or close.
This commit is contained in:
dotCooCoo committed 2026-12-02 17:05:59 -08:00
1 parent e1558e7e4a
commit 79ef692ce5
9 files changed
+115 -8

No files matched your search

+1 -1
View File
@@ -172,9 +172,9 @@ impl Palettes {
pub(crate) fn close(&mut self, id: u64, engine: &str) -> bool {
let before = self.list.len();
self.list.retain(|p| !(p.id == id && p.engine == engine));
self.waiting.retain(|q| q.palette != id);
let closed = self.list.len() != before;
if closed {
self.waiting.retain(|q| q.palette != id);
self.actions.retain(|(p, _)| *p != id);
}
closed