combine pdf-forms-workflows-fw: collect the exclusive toggle's others before emitting (owning source borrows self); auto_scroll_mark_look from style (moved by pdf-canvas-w2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dylan M. Taylor
2026-11-18 08:09:16 -05:00
co-authored by Claude Opus 5.5
parent 7c04a29b60
commit 4737a02bba
3 changed files with 6 additions and 2 deletions
Generated
+1
View File
@@ -3571,6 +3571,7 @@ dependencies = [
name = "craft-review"
version = "0.1.0"
dependencies = [
"base64 0.23.1",
"craft-behavior",
"craft-host",
"craft-i18n",
@@ -401,7 +401,9 @@ impl<C: Collection> ItemsHooks<'_, '_, C> {
let mods = crate::runtime::pointer::frame(&cx.core.ctx).mods;
self.emit_toggle(cx, at, &column, on, mods);
if toggle.exclusive && on {
for other in (0..self.source.len()).filter(|&other| other != at && self.source.toggled(other, &column)) {
// Collected first: emitting needs `self` mutably while the source is read through it.
let others: Vec<usize> = (0..self.source.len()).filter(|&other| other != at && self.source.toggled(other, &column)).collect();
for other in others {
self.emit_toggle(cx, other, &column, false, mods);
}
}
@@ -14,13 +14,14 @@ use crate::contract::cx::{BodyCx, Pointer as _};
use crate::contract::run::{Measuring, ShapeHooks, ShowAt};
use crate::contract::steps::ShapeKind;
use crate::contract::{Bind, Collection, Cx, Internal, ItemCx, ItemOutput as _, PartsCx, Props, Show as _, Sizing};
use crate::primitives::{AutoScrollMark, HiddenContent, ScrollBar, SurfaceSlot, auto_scroll_mark_look};
use crate::primitives::{AutoScrollMark, HiddenContent, ScrollBar, SurfaceSlot};
use crate::runtime::access::{self, Role, SetPosition};
use crate::runtime::egui::{alloc, areas, child, response};
use crate::runtime::env::WheelScope;
use crate::runtime::env::{AppValues, ArenaId, Env, ItemFacts};
use crate::runtime::memory::{MemoryStage, sub};
use crate::runtime::{focus, keys, layout_memory, lazy, overlay, wheel};
use crate::style::auto_scroll_mark_look;
use crate::style::{ComponentStyle as _, StyleCx, SurfaceKind, UiTokens, scroll_bar_look, surface_style};
use craft_behavior::{
Axis, Buttons, CancelReason, EditEvent, Intent, ItemLayout, MiddleButton, MiddleScroll, Mixed, PointerButton, PressPhase, Proposal, ScrollPos,