minor change

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1998-08-17 22:22:29 +00:00
parent 72cb6ff3b3
commit c2b1eaf8ca

View File

@ -576,8 +576,14 @@ void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event)
bool RegTreeCtrl::TreeNode::OnExpand()
{
// remove dummy item
if ( m_lDummy != 0 )
if ( m_lDummy != 0 ) {
m_pTree->DeleteItem(m_lDummy);
m_lDummy = 0;
}
else {
// we've been already expanded
return TRUE;
}
if ( IsRoot() ) {
// we're the root key
@ -595,7 +601,6 @@ bool RegTreeCtrl::TreeNode::OnExpand()
}
if ( !m_pKey->Open() ) {
m_lDummy = 0;
wxLogError("The key '%s' can't be opened.", FullName());
return false;
}