bool CSVSortList::checkDisplayIndex() { irow it; map<int, string, less<int> > lsDis; map<int, string, less<int> >::iterator lsDisItem; for(it = m_svList.begin(); it != m_svList.end(); it++) { SVTableCell *pCell = (*it).second.Cell(1); if(pCell && pCell->Type() == adLineEdit) { if(pCell->Value()) { string szIndex = ((WLineEdit*)pCell->Value())->text(); int nIndex = 0; if(!szIndex.empty()) nIndex = atoi(szIndex.c_str()); lsDisItem = lsDis.find(nIndex); while(lsDisItem != lsDis.end()) { nIndex ++; lsDisItem = lsDis.find(nIndex); } lsDis[nIndex] = pCell->Property(); } } } switch(m_nType) { case Tree_GROUP: saveGroup(lsDis); break; case Tree_DEVICE: saveDevice(lsDis); break; case Tree_MONITOR: saveMonitor(lsDis); break; } return true; }