diffSiblings( r1, r2, d, td );
typename QValueList< DiffItem< SrcItem, TrgItem > >::const_iterator anIt = d.begin(), aLast = d.end();
- bool isFirst = true;
TrgItem lastItem = td.nullTrg();
// TrgItem tail = td.nullTrg();
for( ; anIt!=aLast; anIt++ )
if( item.myTrg==td.nullTrg() )
{
//to add
- lastItem = createSubTree( item.mySrc, r2, lastItem, isFirst, td );
+ lastItem = createSubTree( item.mySrc, r2, lastItem, lastItem==td.nullTrg(), td );
}
else
{
synchronize( item.mySrc, item.myTrg, td );
lastItem = item.myTrg;
}
- isFirst = false;
}
}
}
else
{
- TrgItem new_r2 = createSubTree( r1, td.parent( r2 ), r2, false, td );
+ TrgItem new_r2 = createSubTree( r1, td.parent( r2 ), r2, r2==td.nullTrg(), td );
if( r2!=td.nullTrg() )
td.deleteItemWithChildren( r2 );
return new_r2;
}
}
- // update existing data models (already loaded SComponents)
- LightApp_Application::updateObjectBrowser( updateModels );
-
// create data objects that correspond to GUI state save points
if ( study ) updateSavePointDataObjects( study );
- // -- debug --
- // if ( study && study->root() )
- // study->root()->dump();
+ // update existing data models (already loaded SComponents)
+ LightApp_Application::updateObjectBrowser( updateModels );
}
/*!Display Catalog Genenerator dialog */
for ( int i = 0; i < savePoints.size(); i++ )
if ( !mapDO.contains( savePoints[i] ) )
new SalomeApp_SavePointObject( guiRootObj, savePoints[i], study );
- else {
- ob->updateTree( mapDO[ savePoints[i] ] );
+ else
mapDO.remove( savePoints[i] );
- }
+
// delete DataObjects that are still in the map -- their IDs were not found in data model
for ( QMap<int,SalomeApp_SavePointObject*>::Iterator it = mapDO.begin(); it != mapDO.end(); ++it )
delete it.data();
- ob->updateTree(study->root(), false);
}