Update the directory icon in wxGenericDirCtrl::ExpandDir().
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Dec 2010 12:40:15 +0000 (12:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 3 Dec 2010 12:40:15 +0000 (12:40 +0000)
commitc72fa1cd626f2fe078dd494d68b80cfd9b56f146
tree9d01e44d4da850331c74b304a995ea7dd853a354
parentc892ae145c52b98b41d191f8f208850010c1ae7a
Update the directory icon in wxGenericDirCtrl::ExpandDir().

Calling ExpandDir() to notify the control that a new item was added in a
previously empty directory didn't work as wxTreeCtrl::SetItemHasChildren()
wasn't called.

Fix this by moving SetItemHasChildren() to ExpandDir() from OnExpandItem(), it
must be always done and not just in response to an interactive action.

Closes #12735.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/dirctrlg.cpp