Remove iter with on container.remove
This commit is contained in:
parent
c46616cdb5
commit
b56d38b78d
1 changed files with 6 additions and 4 deletions
|
@ -665,12 +665,13 @@ public class Contacts.Sorted : Container {
|
||||||
|
|
||||||
public override void remove (Widget widget) {
|
public override void remove (Widget widget) {
|
||||||
unowned ChildInfo? info = lookup_info (widget);
|
unowned ChildInfo? info = lookup_info (widget);
|
||||||
if (info == null)
|
if (info == null) {
|
||||||
|
warning ("Tried to remove non-child %p\n", widget);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (info == selected_child) {
|
|
||||||
update_selected (null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (info == selected_child)
|
||||||
|
update_selected (null);
|
||||||
if (info == prelight_child)
|
if (info == prelight_child)
|
||||||
prelight_child = null;
|
prelight_child = null;
|
||||||
if (info == cursor_child)
|
if (info == cursor_child)
|
||||||
|
@ -682,6 +683,7 @@ public class Contacts.Sorted : Container {
|
||||||
widget.unparent ();
|
widget.unparent ();
|
||||||
|
|
||||||
child_hash.unset (widget);
|
child_hash.unset (widget);
|
||||||
|
children.remove (info.iter);
|
||||||
|
|
||||||
update_separator (next, false);
|
update_separator (next, false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue