Salome HOME
detached views can be correctly embedded in Python modules without GUI modification...
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 20 Mar 2017 15:46:37 +0000 (16:46 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 20 Mar 2017 15:46:37 +0000 (16:46 +0100)
src/LightApp/LightApp_Application.cxx
src/STD/STD_TabDesktop.cxx

index 9aee3eebe7872746afec3282da25038bd6146a30..c806a001858b7f0a4c0bef84648b217b05185b98 100644 (file)
@@ -1469,7 +1469,7 @@ SUIT_ViewManager* LightApp_Application::getViewManager( const QString& vmType, c
       aVM = anActiveVM;
     }
 
-  if ( aVM && create )
+  if ( aVM && !aVM->getDetached() && create )
   {
     if ( !aVM->getActiveView() )
       {
index f41b9aaf1d21d5dcf503bf2d4dc9151e835cac42..37766d63ddc559b286710df09b9f4a13e71c0c2f 100644 (file)
@@ -23,7 +23,6 @@
 #include "STD_TabDesktop.h"
 
 #include <SUIT_Session.h>
-#include <SUIT_ViewManager.h>
 #include <SUIT_ViewWindow.h>
 #include <SUIT_ResourceMgr.h>
 
@@ -134,12 +133,6 @@ void STD_TabDesktop::addWindow( QWidget* w )
 {
   if ( !w || !workstack() )
     return;
-  if ( w && w->inherits( "SUIT_ViewWindow" ) )
-       {
-         SUIT_ViewWindow* wid = (SUIT_ViewWindow*)w;
-         if ( wid->getViewManager()->getDetached() )
-               return;
-       }
 
   workstack()->addWindow( w );
 }