From c2b1eaf8ca8831e27f040fd3c65dddc89d55cc6b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 17 Aug 1998 22:22:29 +0000 Subject: [PATCH] minor change git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/regtest/regtest.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index b04dd8748c..5873fc4441 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -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; } -- 2.45.2