invalidate the best size when adding or deleting items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1415,6 +1415,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertItem(const wxTreeItemId& parentId,
|
|||||||
parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size()
|
parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size()
|
||||||
: previous );
|
: previous );
|
||||||
|
|
||||||
|
InvalidateBestSize();
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1449,6 +1450,7 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text,
|
|||||||
m_current->SetHilight( true );
|
m_current->SetHilight( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InvalidateBestSize();
|
||||||
return m_anchor;
|
return m_anchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1509,6 +1511,7 @@ void wxGenericTreeCtrl::DeleteChildren(const wxTreeItemId& itemId)
|
|||||||
wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
|
wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
|
||||||
ChildrenClosing(item);
|
ChildrenClosing(item);
|
||||||
item->DeleteChildren(this);
|
item->DeleteChildren(this);
|
||||||
|
InvalidateBestSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
|
void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
|
||||||
@@ -1573,6 +1576,8 @@ void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
|
|||||||
m_select_me = NULL;
|
m_select_me = NULL;
|
||||||
|
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
|
InvalidateBestSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericTreeCtrl::DeleteAllItems()
|
void wxGenericTreeCtrl::DeleteAllItems()
|
||||||
|
Reference in New Issue
Block a user