[GME-commit] GMESRC/GME/Gme GMEDoc.cpp,1.34,1.35
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Tue Aug 15 18:48:50 CDT 2006
Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv23742
Modified Files:
GMEDoc.cpp
Log Message:
CopyClosure with proposed closure id.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: GMEDoc.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEDoc.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** GMEDoc.cpp 8 Aug 2006 19:09:48 -0000 1.34
--- GMEDoc.cpp 15 Aug 2006 17:48:48 -0000 1.35
***************
*** 243,246 ****
--- 243,259 ----
COMTHROW( cl.CoCreateInstance(L"Mga.MgaClosure") );
+
+ // ask the last closure id in a RO transaction
+ view->BeginTransaction( TRANSACTION_READ_ONLY);
+ try {
+ COMTHROW( cl->GetLastClosureId( theApp.mgaProject, &_markThem));
+ view->CommitTransaction();
+ } catch( hresult_exception& e) {
+ view->AbortTransaction( e.hr);
+ _markThem = -2; // will be increased to -1
+ }
+
+ ++_markThem; // propose this as the next closure id
+
COMTHROW( cl->SelectiveClosureDlg
( VARIANT_FALSE
***************
*** 262,265 ****
--- 275,289 ----
));
if( _okPressed == VARIANT_FALSE) return;
+
+ if( _markThem != -1) // save this if elements need to be marked
+ {
+ view->BeginTransaction();
+ try {
+ COMTHROW( cl->PutLastClosureId( theApp.mgaProject, _markThem));
+ view->CommitTransaction();
+ } catch( hresult_exception& e) {
+ view->AbortTransaction( e.hr);
+ }
+ }
CComObjPtr<IMgaFCOs> sel_fcos, top_fcos;
More information about the GME-commit
mailing list