From 7ac91970bd648c9fbef1bb3b75bbc9d1488542d4 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 20 Mar 2021 09:27:04 +0100 Subject: [PATCH] bug fix: false id clash error for wrapping text --- egui/src/widgets/label.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/egui/src/widgets/label.rs b/egui/src/widgets/label.rs index cc827bb5..c8633081 100644 --- a/egui/src/widgets/label.rs +++ b/egui/src/widgets/label.rs @@ -283,8 +283,7 @@ impl Widget for Label { row.y_min += y_translation; row.y_max += y_translation; let rect = row.rect().translate(vec2(pos.x, pos.y)); - ui.advance_cursor_after_rect(rect); - response |= ui.interact(rect, id, sense); + response |= ui.allocate_rect(rect, sense); } response.widget_info(|| WidgetInfo::labeled(WidgetType::Label, &galley.text)); self.paint_galley_focus(ui, pos, galley, response.has_focus());