]> SALOME platform Git repositories - modules/gui.git/blobdiff - src/STD/STD_TabDesktop.cxx
Salome HOME
try to avoid to add detached viewer on desktop viewer tab
[modules/gui.git] / src / STD / STD_TabDesktop.cxx
index 37766d63ddc559b286710df09b9f4a13e71c0c2f..f41b9aaf1d21d5dcf503bf2d4dc9151e835cac42 100644 (file)
@@ -23,6 +23,7 @@
 #include "STD_TabDesktop.h"
 
 #include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
 #include <SUIT_ViewWindow.h>
 #include <SUIT_ResourceMgr.h>
 
@@ -133,6 +134,12 @@ 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 );
 }