X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c41ea66a5de1e88529e0ce2e629f5757b219b97d..d062e17fca1a1fc0b82b269da4a7ad271075ba2b:/samples/regtest/regtest.cpp diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index f1960608af..2e8b20c303 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -162,7 +162,7 @@ public: void AddStdKeys(); private: - DECLARE_EVENT_TABLE(); + DECLARE_EVENT_TABLE() }; // ---------------------------------------------------------------------------- @@ -194,7 +194,7 @@ public: void OnInfo (wxCommandEvent& event); - DECLARE_EVENT_TABLE(); + DECLARE_EVENT_TABLE() private: RegTreeCtrl *m_treeCtrl; @@ -913,10 +913,11 @@ bool RegTreeCtrl::TreeNode::OnExpand() if ( isEmpty ) { // this is for the case when our last child was just deleted - m_pTree->Collapse(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + m_pTree->Collapse(theId); // we won't be expanded any more - m_pTree->SetItemHasChildren(Id(), FALSE); + m_pTree->SetItemHasChildren(theId, FALSE); } return TRUE; @@ -935,14 +936,15 @@ void RegTreeCtrl::TreeNode::Refresh() if ( !IsKey() ) return; - bool wasExpanded = m_pTree->IsExpanded(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + bool wasExpanded = m_pTree->IsExpanded(theId); if ( wasExpanded ) - m_pTree->Collapse(Id()); + m_pTree->Collapse(theId); OnCollapse(); - m_pTree->SetItemHasChildren(Id()); + m_pTree->SetItemHasChildren(theId); if ( wasExpanded ) { - m_pTree->Expand(Id()); + m_pTree->Expand(theId); OnExpand(); } } @@ -967,7 +969,8 @@ bool RegTreeCtrl::TreeNode::DeleteChild(TreeNode *child) } if ( ok ) { - m_pTree->Delete(child->Id()); + wxTreeItemId theId(child->Id()); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); Refresh(); } @@ -983,7 +986,8 @@ void RegTreeCtrl::TreeNode::DestroyChildren() long lId = m_aChildren[n]->Id(); // no, wxTreeCtrl will do it //delete m_aChildren[n]; - m_pTree->Delete(lId); + wxTreeItemId theId(lId); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); } m_aChildren.Empty();