egui icon indicating copy to clipboard operation
egui copied to clipboard

possible regression in 0.28 vs 0.27 in dnd_drag_source

Open 3gx opened this issue 7 months ago • 1 comments

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. In tutorial https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/demo/drag_and_drop.rs#L72C1-L75C1,
    replace
                        let response = ui
                            .dnd_drag_source(item_id, item_location, |ui| {
                                ui.label(item);
                            })
                            .response;

with

                        let response = ui
                            .dnd_drag_source(item_id, item_location, |ui| {
                                ui.vertical(|ui| {
                                  ui.label("--");
                                  ui.label(item);
                                 });
                            })
                            .response;
  1. Click on it

  2. Error

thread 'main' panicked at /Users/egx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.28.1/src/widget_rect.rs:142:17:
Widget changed layer_id during the frame
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at /Users/egx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/macos/app_state.rs:387:33:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }

Expected behavior Can be dragged with 0.27

Screenshots

Desktop (please complete the following information):

  • OS: MacOS 14.5

3gx avatar Jul 27 '24 18:07 3gx