}
}
}
-
+
return sel;
}
wxListItem info;
info.m_itemId = event.m_itemIndex;
mLastSelected=event.m_itemIndex;
-
+
// retrieve the level
wxObject* obj = event.GetEventObject();
unsigned int level = 0;
GimmickDebugMessage(1,
" Level "<<level+1
<<std::endl);
+
+
+ mSelected=GetSelected(level+2);
+
if (level<mLevelList.size()-1) UpdateLevel( level + 2 );
+
if (level==mLevelList.size()-1) ValidateSelectedImages ();
}
{
if ( GetCtrl(level) == ctrl ) break;
}
+
UpdateLevel(level+1);
+
wxBusyCursor busy;
int l = level - 1;
-
+
//Sets the data for the items to be sorted
std::string att;
unsigned int ty=0;
}
//Resets original data
-
+ std::vector<tree::Node*>::iterator selection;
+ std::vector<long> change;
long it = -1;
for ( ;; )
{
//Gets current item data, extracts the node and resets it
long item = GetCtrl(level)->GetItemData(it);
GetCtrl(level)->SetItemData(it,((long*)item)[0]);
+ tree::Node* n= ((ItemData*)((long*)item)[0])->node;
+ for(selection=mSelected.begin();selection!=mSelected.end();++selection)
+ {
+ if((*selection)->GetAttribute("ID").compare(n->GetAttribute("ID"))==0)
+ {
+ change.push_back(it);
+ }
+ }
+
+ }
+ std::vector<long>::iterator selectedIts;
+ for(selectedIts=change.begin();selectedIts!=change.end();++selectedIts)
+ {
+ GetCtrl(level)->SetItemState(*selectedIts,wxLIST_STATE_SELECTED, wxLIST_MASK_STATE
+ | wxLIST_MASK_TEXT |wxLIST_MASK_IMAGE | wxLIST_MASK_DATA | wxLIST_MASK_WIDTH | wxLIST_MASK_FORMAT);
}
}