refresh added when the item text or image is changed so it's redrawn
immediately git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -447,21 +447,27 @@ void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
|
|||||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
item.m_pItem->SetText(text, dc);
|
wxGenericTreeItem *pItem = item.m_pItem;
|
||||||
|
pItem->SetText(text, dc);
|
||||||
|
RefreshLine(pItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image)
|
void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||||
|
|
||||||
item.m_pItem->SetImage(image);
|
wxGenericTreeItem *pItem = item.m_pItem;
|
||||||
|
pItem->SetImage(image);
|
||||||
|
RefreshLine(pItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
|
void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||||
|
|
||||||
item.m_pItem->SetSelectedImage(image);
|
wxGenericTreeItem *pItem = item.m_pItem;
|
||||||
|
pItem->SetSelectedImage(image);
|
||||||
|
RefreshLine(pItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data)
|
void wxTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data)
|
||||||
@@ -475,7 +481,9 @@ void wxTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||||
|
|
||||||
item.m_pItem->SetHasPlus(has);
|
wxGenericTreeItem *pItem = item.m_pItem;
|
||||||
|
pItem->SetHasPlus(has);
|
||||||
|
RefreshLine(pItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
void wxTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
||||||
|
Reference in New Issue
Block a user