[GME-commit] GMESRC/GME/Mga MgaCheck.cpp,1.10,1.11 MgaLibOps.cpp,1.11,1.12

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Oct 3 17:22:57 CDT 2006


Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv32179a

Modified Files:
	MgaCheck.cpp MgaLibOps.cpp 
Log Message:
Importing a project failed when contained nested libraries.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: MgaLibOps.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** MgaLibOps.cpp	21 Jul 2006 19:44:22 -0000	1.11
--- MgaLibOps.cpp	3 Oct 2006 16:22:55 -0000	1.12
***************
*** 468,472 ****
  			if( is_old_lib_copy) // do a plain old refresh
  			{
! 				MyCComBSTR msg( "Old version of Library refresh started on library.");
  				Reporter( mgaproject).show( msg, false);
  
--- 468,473 ----
  			if( is_old_lib_copy) // do a plain old refresh
  			{
! 				MyCComBSTR msg( "Old version of Library refresh started [");
! 				msg.AppendBSTR( libname); msg.Append( "] --");
  				Reporter( mgaproject).show( msg, false);
  
***************
*** 477,481 ****
  			else // do a uid based refresh
  			{
! 				MyCComBSTR msg( "---------------------Library refresh v2 started---------------------");
  				Reporter( mgaproject).show( msg, false);
  				
--- 478,483 ----
  			else // do a uid based refresh
  			{
! 				MyCComBSTR msg( "---------------------Library refresh v2 started [");
! 				msg.AppendBSTR( libname); msg.Append( "] --");
  				Reporter( mgaproject).show( msg, false);
  				

Index: MgaCheck.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaCheck.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** MgaCheck.cpp	19 May 2006 18:35:30 -0000	1.10
--- MgaCheck.cpp	3 Oct 2006 16:22:55 -0000	1.11
***************
*** 206,209 ****
--- 206,222 ----
  							if( t2 == OBJTYPE_NULL) stillok = true;
  							else if( libnm2)        stillok = true;
+ 
+ 							if( !stillok)
+ 							{
+ 								// inner libraries need some special care
+ 								// because upon Import XML get_LibraryName gives back 0x0000
+ 								// since the LIBROOT_FLAG, LIBRARY_FLAG flags are not set yet
+ 								CComPtr<IMgaMetaProject> mp;
+ 								COMTHROW(mgaproject->get_RootMeta(&mp));
+ 								CComPtr<IMgaMetaFolder> mf;
+ 								COMTHROW(mp->get_RootFolder(&mf));
+ 								// ok, if current element and its parent are both rootfolders
+ 								stillok = COM_EQUAL( metaf, parentmf) && COM_EQUAL( metaf, mf);
+ 							}
  					}
  					if(!stillok) COMTHROW(E_MGA_META_VIOLATION);



More information about the GME-commit mailing list