forked from AuroraMiddleware/gtk
listview: Avoid a critical when reordering
When sorting a cell into the place its already at, we were triggering criticals. Avoid that. Fixes: #3180
This commit is contained in:
parent
810218b2f5
commit
9fde0137a0
@ -629,11 +629,14 @@ gtk_list_item_widget_reorder_child (GtkListItemWidget *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (child != sibling)
|
||||||
|
{
|
||||||
gtk_widget_insert_after (child, widget, sibling);
|
gtk_widget_insert_after (child, widget, sibling);
|
||||||
gtk_css_node_insert_after (gtk_widget_get_css_node (widget),
|
gtk_css_node_insert_after (gtk_widget_get_css_node (widget),
|
||||||
gtk_widget_get_css_node (child),
|
gtk_widget_get_css_node (child),
|
||||||
sibling ? gtk_widget_get_css_node (sibling) : NULL);
|
sibling ? gtk_widget_get_css_node (sibling) : NULL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_list_item_widget_remove_child (GtkListItemWidget *self,
|
gtk_list_item_widget_remove_child (GtkListItemWidget *self,
|
||||||
|
Loading…
Reference in New Issue
Block a user