diff --git a/crates/ui-egui/src/tools/crop_ui.rs b/crates/ui-egui/src/tools/crop_ui.rs index dce46b3c2f..c9dcdc9bc6 100644 --- a/crates/ui-egui/src/tools/crop_ui.rs +++ b/crates/ui-egui/src/tools/crop_ui.rs @@ -51,10 +51,9 @@ pub struct CropState { pub default_frame: bool, /// The document (index and size) the default frame was made for. frame_for: Option<(usize, u32, u32)>, - /// The document (id and size) whose frame Esc (or the options bar's cancel) hid: with the - /// Crop tool still picked no default frame is made for it until a press on the canvas, or - /// leaving and re-picking the tool, as in Photoshop (#10370). Keyed by id, not tab index, so - /// closing it never hides the frame of the tab that takes its place. + /// The document (id and size) whose frame [`dismiss`] hid: no default frame is made for it while + /// this matches. Keyed by id, not tab index, so closing it never hides the frame of the tab that + /// takes its place. dismissed: Option<(photocraft_doc::DocId, u32, u32)>, /// The frame is being edited (pressed since it was made): the canvas shows what lies past it. pub editing: bool, diff --git a/crates/ui-egui/src/tools/crop_ui/tests.rs b/crates/ui-egui/src/tools/crop_ui/tests.rs index 3f5f537390..3b06b80cd8 100644 --- a/crates/ui-egui/src/tools/crop_ui/tests.rs +++ b/crates/ui-egui/src/tools/crop_ui/tests.rs @@ -1200,8 +1200,7 @@ fn esc_hides_the_frame_until_a_press_or_re_picking_the_tool() { #[test] fn closing_a_dismissed_document_never_hides_the_next_tabs_frame() { - // #10370 review: the dismissal was keyed by tab index, so a same-size tab moving into the - // closed one's index kept its frame hidden. + // A same-size tab that takes the closed document's index must still show its frame. let mut app = app(SampleType::U8); let doc = Document::with_background("other", Size::new(200, 100), ColorMode::Rgb, SampleType::U8, Color::WHITE); app.session.add_document(doc, None); @@ -1218,8 +1217,8 @@ fn closing_a_dismissed_document_never_hides_the_next_tabs_frame() { #[test] fn a_straighten_press_ends_the_dismissal() { - // #10370 review: a press taken by Straighten skipped `begin_drag`, which ends the dismissal, - // so a click too short to level anything left the frame hidden. + // Straighten takes the press before `begin_drag`; a click too short to level anything still + // ends the dismissal. let mut app = app(SampleType::U8); ensure_frame(&mut app); press_esc(&mut app);