[GME-commit] GMESRC/GME/Gme GMEView.cpp,1.175,1.176

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Nov 17 19:16:50 CST 2005


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv1282

Modified Files:
	GMEView.cpp 
Log Message:
Fixing again the rebuild process in Reset, and speeding it up.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -C2 -d -r1.175 -r1.176
*** GMEView.cpp	17 Nov 2005 17:59:33 -0000	1.175
--- GMEView.cpp	17 Nov 2005 19:16:48 -0000	1.176
***************
*** 1742,1787 ****
  		// 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();
! 		while(pos) {
! 			CString id = selIDs.GetNext(pos);
  			POSITION oPos = children.GetHeadPosition();
  			while(oPos) {
  				CGuiObject *obj = dynamic_cast<CGuiObject *>(children.GetNext(oPos));
! 				if(obj) {
! 					if(id == obj->id)
! 						selected.AddTail(obj); // this->SendSelecEvent4Object( obj); omitted because of a READONLY transaction
  				}
  			}
  		}
  
  		pos = selAnIDs.GetHeadPosition();
--- 1742,1801 ----
  		// EndNote
  
! 		if( !(selIDs.IsEmpty() && lstSelBuffIDs.IsEmpty() && lstUnsBuffIDs.IsEmpty()))
! 		{
! 			// 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 = 0;
! 						}
! 					}
! 
! 					bool found = false; // will save time because if obj is in lstSelBuffIDs (m_lstSelect), it can't be in lstUnsBuffIDs (m_lstUnselect)
! 					sPos = lstSelBuffIDs.GetHeadPosition();
! 					while( !found && sPos) {
! 						CString id = lstSelBuffIDs.GetNext( sPos);
! 						if( id == obj->id)
! 						{
! 							m_lstSelect.push_back( obj);
! 							found = true;
! 						}
! 					}
! 
! 					sPos = lstUnsBuffIDs.GetHeadPosition();
! 					while( !found && sPos) {
! 						CString id = lstUnsBuffIDs.GetNext( sPos);
! 						if( id == obj->id)
! 						{
! 							m_lstUnselect.push_back( obj);
! 							found = true;
! 						}
! 					}
  				}
  			}
  		}
+ 
+ 		// selected was filled up previously like this:
+ 		// now it is done along with m_lstSelect, m_lstUnselect
+ 		//pos = selIDs.GetHeadPosition();
+ 		//while(pos) {
+ 		//	CString id = selIDs.GetNext(pos);
+ 		//	POSITION oPos = children.GetHeadPosition();
+ 		//	while(oPos) {
+ 		//		CGuiObject *obj = dynamic_cast<CGuiObject *>(children.GetNext(oPos));
+ 		//		if(obj) {
+ 		//			if(id == obj->id)
+ 		//				selected.AddTail(obj); // this->SendSelecEvent4Object( obj); omitted because of a READONLY transaction
+ 		//		}
+ 		//	}
+ 		//}
  
  		pos = selAnIDs.GetHeadPosition();



More information about the GME-commit mailing list