[GME-commit] GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.51,1.52

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Aug 15 18:48:05 CDT 2006


Update of /project/gme-repository/GMESRC/GME/GMEActiveBrowser
In directory escher:/tmp/cvs-serv23699

Modified Files:
	ActiveBrowserPropertyPage.cpp 
Log Message:
CopyClosure with proposed closureid.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: ActiveBrowserPropertyPage.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** ActiveBrowserPropertyPage.cpp	8 Aug 2006 19:10:22 -0000	1.51
--- ActiveBrowserPropertyPage.cpp	15 Aug 2006 17:48:03 -0000	1.52
***************
*** 972,975 ****
--- 972,989 ----
  
  		COMTHROW( cl.CoCreateInstance(L"Mga.MgaClosure") );
+ 
+ 		// ask the last closure id in a RO transaction
+ 		CMgaContext* pMgaContext = &pApp->m_CurrentProject.m_MgaContext;
+ 		pMgaContext->BeginTransaction( TRUE); // readonly
+ 		try {
+ 			COMTHROW( cl->GetLastClosureId( pMgaContext->m_ccpProject, &_markThem));
+ 			pMgaContext->CommitTransaction();
+ 		} catch( hresult_exception& ) {
+ 			pMgaContext->AbortTransaction();
+ 			_markThem = -2; // will be increased to -1
+ 		}
+ 
+ 		++_markThem; // propose this as the next closure id
+ 
  		COMTHROW( cl->SelectiveClosureDlg
  			( is_any_folder_selected ? VARIANT_TRUE : VARIANT_FALSE
***************
*** 991,994 ****
--- 1005,1019 ----
  			));
  		if( _okPressed == VARIANT_FALSE) return;
+ 
+ 		if( _markThem != -1) // save this if elements need to be marked
+ 		{
+ 			pMgaContext->BeginTransaction( FALSE);
+ 			try {
+ 				COMTHROW( cl->PutLastClosureId( pMgaContext->m_ccpProject, _markThem));
+ 				pMgaContext->CommitTransaction();
+ 			} catch( hresult_exception& ) {
+ 				pMgaContext->AbortTransaction();
+ 			}
+ 		}
  
  		CComObjPtr<IMgaFCOs> sel_fcos, top_fcos;



More information about the GME-commit mailing list