[GME-commit] GMESRC/GME/Mga MgaLibRefr.h, 1.5, 1.6 MgaLibRefr.cpp,
1.8, 1.9
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Mar 8 13:21:49 CST 2007
Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv16443
Modified Files:
MgaLibRefr.h MgaLibRefr.cpp
Log Message:
Problematic relids are healed now, upon AttachDerObj.
See GME-145 in JIRA for descr.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaLibRefr.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibRefr.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MgaLibRefr.cpp 7 Mar 2007 22:12:32 -0000 1.8
--- MgaLibRefr.cpp 8 Mar 2007 19:21:47 -0000 1.9
***************
*** 2369,2372 ****
--- 2369,2386 ----
}
+ void RefreshManager::propObjRelidIncV2( CoreObj& p_obj)
+ {
+ long brelid = p_obj[ATTRID_RELID];
+
+ // for all deriveds from p_obj
+ CoreObjs deriveds = p_obj[ATTRID_DERIVED + ATTRID_COLLECTION];
+ ITERATE_THROUGH(deriveds) {
+ // increase depth
+ ITER[ATTRID_RELID] = brelid + RELIDSPACE;
+
+ propObjRelidIncV2( ITER);
+ }
+ }
+
// obj (with its children, grandchildren) are inner object in a basemodel
// thus their derivations need relidchange (and are secondary derived)
***************
*** 2657,2660 ****
--- 2671,2691 ----
p_derdObj[ai] = p_derdObj[ai]+RELIDSPACE;//shift its own relid
if(p_derdObj[ai] <= 0) COMTHROW(E_MGA_LONG_DERIVCHAIN); // overflow
+ } else if( !prim) // alterRelids is false but still we check something here
+ { // Damage Control for GME-145 entry in JIRA
+ // relids were messed up by the other PropObjRelidInc mechanism
+ // because it was invoked to all children of the derd
+ // and children are not always homogeneous
+ unsigned long lb = p_baseObj[ai];
+ unsigned long ld = p_derdObj[ai];
+ if( ld <= lb)
+ { // Shift relid
+ p_derdObj[ai] = lb + RELIDSPACE;
+ propObjRelidIncV2( p_derdObj);
+ #ifdef _DEBUG
+ CComBSTR msg = p_derdObj[ATTRID_NAME];
+ msg.Append( " relid problem corrected");
+ m_reporter.show( msg, false);
+ #endif
+ }
}
break;
Index: MgaLibRefr.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibRefr.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MgaLibRefr.h 7 Mar 2007 22:12:32 -0000 1.5
--- MgaLibRefr.h 8 Mar 2007 19:21:47 -0000 1.6
***************
*** 865,868 ****
--- 865,869 ----
void PropObjRelidDecrease( CoreObj& orig, long level = 0);
void PropObjRelidIncrease( CoreObj& orig);
+ void propObjRelidIncV2( CoreObj& orig);
// aggregates objects in the project which are
More information about the GME-commit
mailing list