From 353ae915d182281648ed422139c3979d7a256ec9 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 20 Mar 2017 16:46:37 +0100 Subject: [PATCH] detached views can be correctly embedded in Python modules without GUI modification, View Creation for GEOM or SMESH must take into account embedded VM --- src/LightApp/LightApp_Application.cxx | 2 +- src/STD/STD_TabDesktop.cxx | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 9aee3eebe..c806a0018 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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() ) { diff --git a/src/STD/STD_TabDesktop.cxx b/src/STD/STD_TabDesktop.cxx index f41b9aaf1..37766d63d 100644 --- a/src/STD/STD_TabDesktop.cxx +++ b/src/STD/STD_TabDesktop.cxx @@ -23,7 +23,6 @@ #include "STD_TabDesktop.h" #include -#include #include #include @@ -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 ); } -- 2.30.2