File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -178,14 +178,6 @@ impl WidgetRects {
178178 // e.g. calling `response.interact(…)` to add more interaction.
179179 let ( idx_in_layer, existing) = entry. get_mut ( ) ;
180180
181- debug_assert ! (
182- existing. layer_id == widget_rect. layer_id,
183- "Widget {:?} changed layer_id during the frame from {:?} to {:?}" ,
184- widget_rect. id,
185- existing. layer_id,
186- widget_rect. layer_id
187- ) ;
188-
189181 // Update it:
190182 existing. rect = widget_rect. rect ; // last wins
191183 existing. interact_rect = widget_rect. interact_rect ; // last wins
@@ -200,6 +192,11 @@ impl WidgetRects {
200192 } else {
201193 layer_widgets[ * idx_in_layer] = * existing;
202194 }
195+ } else if cfg ! ( debug_assertions) {
196+ panic ! (
197+ "DEBUG ASSERT: Widget {:?} changed layer_id during the frame from {:?} to {:?}" ,
198+ widget_rect. id, existing. layer_id, widget_rect. layer_id
199+ ) ;
203200 }
204201 }
205202 }
You can’t perform that action at this time.
0 commit comments