Salome HOME
Modification for correct update of the object browser.
authormkr <mkr@opencascade.com>
Wed, 8 Jun 2005 09:51:34 +0000 (09:51 +0000)
committermkr <mkr@opencascade.com>
Wed, 8 Jun 2005 09:51:34 +0000 (09:51 +0000)
src/SUPERVGUI/SUPERVGUI_Main.cxx

index e8c624e77755cbb1f4c96c299bdeb0e638c0e522..b30721359265ed68a0f9044e9fdba350603580bd 100644 (file)
@@ -898,7 +898,8 @@ _PTR(SObject) createDataflowSObj( SUIT_Study* study,
   if ( !aSO ) { // dataflow SObject not found in the study
     aDoneSomething = true; 
     _PTR(SComponent) aComponent = aStudy->FindComponent(STUDY_SUPERVISION);
-    if ( aComponent ) { // if component found, create name and icon for it to display it in object browser
+    if ( !aComponent ) { // is supervision component not found, then create it
+      aComponent = aBuilder->NewComponent(STUDY_SUPERVISION);
       anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
       aName = anAttr;
       aName->SetValue( (( CAM_Application* )(study->application()))->moduleTitle( "SUPERV" ).latin1() );