Remove debug-assert triggered by `with_layer_id/dnd_drag_source` (#5191)
* Closes https://github.com/emilk/egui/issues/5178
This commit is contained in:
parent
679f6f57b1
commit
db3dcaf447
|
|
@ -2260,6 +2260,16 @@ impl Ui {
|
|||
}
|
||||
|
||||
/// Redirect shapes to another paint layer.
|
||||
///
|
||||
/// ```
|
||||
/// # use egui::{LayerId, Order, Id};
|
||||
/// # egui::__run_test_ui(|ui| {
|
||||
/// let layer_id = LayerId::new(Order::Tooltip, Id::new("my_floating_ui"));
|
||||
/// ui.with_layer_id(layer_id, |ui| {
|
||||
/// ui.label("This is now in a different layer");
|
||||
/// });
|
||||
/// # });
|
||||
/// ```
|
||||
pub fn with_layer_id<R>(
|
||||
&mut self,
|
||||
layer_id: LayerId,
|
||||
|
|
|
|||
|
|
@ -139,11 +139,6 @@ impl WidgetRects {
|
|||
// e.g. calling `response.interact(…)` to add more interaction.
|
||||
let (idx_in_layer, existing) = entry.get_mut();
|
||||
|
||||
debug_assert!(
|
||||
existing.layer_id == widget_rect.layer_id,
|
||||
"Widget changed layer_id during the frame"
|
||||
);
|
||||
|
||||
// Update it:
|
||||
existing.rect = widget_rect.rect; // last wins
|
||||
existing.interact_rect = widget_rect.interact_rect; // last wins
|
||||
|
|
|
|||
Loading…
Reference in New Issue