[GME-commit] GMESRC/GME/Gme GMEView.cpp,1.174,1.175
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Nov 17 17:59:35 CST 2005
Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv753
Modified Files:
GMEView.cpp
Log Message:
Rebuilding the stored sel/unsel list of GUIObjects upon Reset.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.174
retrieving revision 1.175
diff -C2 -d -r1.174 -r1.175
*** GMEView.cpp 15 Nov 2005 20:06:54 -0000 1.174
--- GMEView.cpp 17 Nov 2005 17:59:33 -0000 1.175
***************
*** 1645,1648 ****
--- 1645,1657 ----
BeginWaitCursor();
+ // store the ids of the objects placed into the notifiable objects
+ CStringList lstSelBuffIDs;
+ CStringList lstUnsBuffIDs;
+ for( std::list<CGuiObject*>::iterator iti = m_lstSelect.begin(); iti != m_lstSelect.end(); ++iti)
+ lstSelBuffIDs.AddTail( (*iti)->id);
+
+ for( std::list<CGuiObject*>::iterator itj = m_lstUnselect.begin(); itj != m_lstUnselect.end(); ++itj)
+ lstUnsBuffIDs.AddTail( (*itj)->id);
+
CStringList selIDs;
CStringList selAnIDs;
***************
*** 1697,1700 ****
--- 1706,1711 ----
+ m_lstSelect.clear(); // clear the contents of these buffers [will be refilled soon]
+ m_lstUnselect.clear();
children.RemoveAll();
annotators.RemoveAll();
***************
*** 1731,1734 ****
--- 1742,1774 ----
// EndNote
+
+ // filling up selected, m_lstSelect and m_lstUnselect lists
+ POSITION oPos = children.GetHeadPosition();
+ while(oPos) {
+ CGuiObject *obj = dynamic_cast<CGuiObject *>(children.GetNext(oPos));
+ if( obj)
+ {
+ POSITION sPos = selIDs.GetHeadPosition();
+ while( sPos) {
+ CString id = selIDs.GetNext( sPos);
+ if( id == obj->id)
+ selected.AddTail( obj);
+ }
+
+ sPos = lstSelBuffIDs.GetHeadPosition();
+ while( sPos) {
+ CString id = lstSelBuffIDs.GetNext( sPos);
+ if( id == obj->id)
+ m_lstSelect.push_back( obj);
+ }
+
+ sPos = lstUnsBuffIDs.GetHeadPosition();
+ while( sPos) {
+ CString id = lstUnsBuffIDs.GetNext( sPos);
+ if( id == obj->id)
+ m_lstUnselect.push_back( obj);
+ }
+ }
+ }
pos = selIDs.GetHeadPosition();
More information about the GME-commit
mailing list