From: John L. <jr...@us...> - 2009-12-22 22:57:11
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22839/wxLua/modules/wxluadebug/src Modified Files: wxlstack.cpp Log Message: Fix using button to collapse treectrl generic. Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxlstack.cpp 23 Nov 2009 05:29:01 -0000 1.35 --- wxlstack.cpp 22 Dec 2009 22:57:02 -0000 1.36 *************** *** 532,536 **** RemoveAllLuaReferences(); // remove them now since we're starting from scratch ! m_stack_sel = stack_sel; int n_entry = m_stackEntries[m_stack_sel]; --- 532,536 ---- RemoveAllLuaReferences(); // remove them now since we're starting from scratch ! m_stack_sel = stack_sel; int n_entry = m_stackEntries[m_stack_sel]; *************** *** 693,697 **** wxTreeItemIdValue dummyCookie; wxTreeItemId dummyId = m_treeCtrl->GetFirstChild(treeId, dummyCookie); ! if ((m_treeCtrl->GetItemText(dummyId) == DUMMY_TREEITEM) && (m_treeCtrl->GetItemData(dummyId) == NULL)) { --- 693,697 ---- wxTreeItemIdValue dummyCookie; wxTreeItemId dummyId = m_treeCtrl->GetFirstChild(treeId, dummyCookie); ! if ((m_treeCtrl->GetItemText(dummyId) == DUMMY_TREEITEM) && (m_treeCtrl->GetItemData(dummyId) == NULL)) { *************** *** 767,771 **** --- 767,780 ---- ExpandItemChildren(start_item); else + { + wxLuaStackListData* stkListData = (wxLuaStackListData*)m_listData[start_item]; + wxCHECK_RET(stkListData != NULL, wxT("Invalid wxLuaStack data")); + + // Hack for WXLUA_STACK_MSWTREE, collapse tree first + if (stkListData->m_treeId && m_treeCtrl->IsExpanded(stkListData->m_treeId)) + m_treeCtrl->Collapse(stkListData->m_treeId); + CollapseItem(start_item); + } } *************** *** 1006,1010 **** else { ! // Hack for WXLUA_STACK_MSWTREE, need children to collapse if (stkListData->m_treeId && m_treeCtrl->IsExpanded(stkListData->m_treeId)) m_treeCtrl->Collapse(stkListData->m_treeId); --- 1015,1019 ---- else { ! // Hack for WXLUA_STACK_MSWTREE, collapse tree first if (stkListData->m_treeId && m_treeCtrl->IsExpanded(stkListData->m_treeId)) m_treeCtrl->Collapse(stkListData->m_treeId); *************** *** 1119,1123 **** wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! if ((n > lc_item) && (stkListData_n->m_level <= level)) break; --- 1128,1132 ---- wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! if ((n > lc_item) && (stkListData_n->m_level <= level)) break; *************** *** 1186,1195 **** m_expandedItems.erase(long_key); } ! // note that the debug item is a member of the parent debug data array debugItem_n->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); //m_listData.RemoveAt(n); // we remove them all at once for speed, see below ! //n--; //count = m_listData.GetCount(); delete stkListData_n; --- 1195,1204 ---- m_expandedItems.erase(long_key); } ! // note that the debug item is a member of the parent debug data array debugItem_n->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); //m_listData.RemoveAt(n); // we remove them all at once for speed, see below ! //n--; //count = m_listData.GetCount(); delete stkListData_n; |