]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PAL19295: crash on study open V5_0_0a1 V5_0_0a2 VSR_280308
authorasl <asl@opencascade.com>
Fri, 28 Mar 2008 13:09:57 +0000 (13:09 +0000)
committerasl <asl@opencascade.com>
Fri, 28 Mar 2008 13:09:57 +0000 (13:09 +0000)
src/SUIT/SUIT_TreeModel.cxx
src/SalomeApp/SalomeApp_Application.cxx

index 12dc98e56a241d029bafaab2df97f1ef6a8cd614..b58523931a40264b05f909df867cb359683c7f53 100755 (executable)
@@ -144,7 +144,7 @@ SUIT_TreeModel::TreeItem* SUIT_TreeModel::TreeItem::parent() const
 */
 int SUIT_TreeModel::TreeItem::position() const
 {
-  return myParent->myChildren.indexOf( (TreeItem*)this );
+  return myParent ? myParent->myChildren.indexOf( (TreeItem*)this ) : -1;
 }
 
 /*!
index 6a9c4b1dc7a415f416e5d079d325d47a05f1ffd1..28a50cb1ac51ac47969e60c92cf1f546f38d9a20 100644 (file)
@@ -1127,14 +1127,11 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
        if ( aComponent->ComponentDataType() == "Interface Applicative" )
          continue; // skip the magic "Interface Applicative" component
 
-       // temporary commented
-       /*OB_Browser* ob = static_cast<OB_Browser*>( getWindow( WT_ObjectBrowser ));
-       const bool isAutoUpdate = ob->isAutoUpdate();
-       ob->setAutoUpdate( false );*/
+        getWindow( WT_ObjectBrowser );
+       const bool isAutoUpdate = objectBrowser()->autoUpdate();
+       objectBrowser()->setAutoUpdate( false );
        SalomeApp_DataModel::synchronize( aComponent, study );
-       // temporary commented
-       /*ob->setAutoUpdate( isAutoUpdate );*/
-        //SalomeApp_DataModel::BuildTree( aComponent, study->root(), study, /*skipExisitng=*/true );
+       objectBrowser()->setAutoUpdate( isAutoUpdate );
       }
     }
   }