test changing of selected item's icon in DoToggleIcon as well

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2006-07-10 22:27:36 +00:00
parent 8c9126acc1
commit 0c36b36e98

View File

@ -878,10 +878,15 @@ void MyTreeCtrl::GetItemsRecursively(const wxTreeItemId& idParent,
void MyTreeCtrl::DoToggleIcon(const wxTreeItemId& item)
{
int image = GetItemImage(item) == TreeCtrlIcon_Folder ? TreeCtrlIcon_File
: TreeCtrlIcon_Folder;
int image = (GetItemImage(item) == TreeCtrlIcon_Folder)
? TreeCtrlIcon_File
: TreeCtrlIcon_Folder;
SetItemImage(item, image, wxTreeItemIcon_Normal);
SetItemImage(item, image);
image = (GetItemImage(item) == TreeCtrlIcon_FolderSelected)
? TreeCtrlIcon_FileSelected
: TreeCtrlIcon_FolderSelected;
SetItemImage(item, image, wxTreeItemIcon_Selected);
}