X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUIT%2FSUIT_ViewManager.cxx;h=cab5a470b0dd8f3228c1e40faf75d014cf124a1f;hb=82c798c0db395e1f2aa725d1c74bc24f014751cc;hp=a2b74dd3f77e92f57ab73d4a59c5b41e7bb020cc;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index a2b74dd3f..cab5a470b 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -64,15 +64,25 @@ SUIT_ViewWindow* SUIT_ViewManager::createViewWindow() { SUIT_ViewWindow* aView = myViewModel->createView(myDesktop); - if ( !insertView( aView ) ) + if ( !insertView( aView ) ){ delete aView; + return 0; + } setViewName( aView ); //myDesktop->addViewWindow( aView ); //it is done automatically during creation of view aView->setViewManager(this); + emit viewCreated(aView); + + // Special treatment for the case when is the first one in this view manager + // -> call onWindowActivated() directly, because somebody may always want + // to use getActiveView() + if ( !myActiveView ) + onWindowActivated( aView ); + return aView; }