Skip to content

Commit

Permalink
Fix conflicting dnd IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
trumank committed Aug 11, 2023
1 parent e4cb302 commit e517647
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,18 @@ impl App {
}
};

let res =
egui_dnd::dnd(ui, "dnd").show_vec(&mut profile.mods, |ui, item, handle, state| {
let res = egui_dnd::dnd(ui, ui.id().with("dnd")).show_vec(
&mut profile.mods,
|ui, item, handle, state| {
ui.horizontal(|ui| {
handle.ui(ui, |ui| {
ui.label("☰");
});

ui_item(&mut ctx, ui, item, state.index);
});
});
},
);

if res.final_update().is_some() {
ctx.needs_save = true;
Expand Down

0 comments on commit e517647

Please sign in to comment.