X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ViewerFilters.cpp;h=d24dbfd693643e7c6eee8daf07a25b30b59748ed;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=ccb8eae4cc447bde125151e06e6a552a8defd67a;hpb=9c2ebe24ff57ce6126b240f8f2c8f58d8a94ace7;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index ccb8eae4c..d24dbfd69 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,15 +12,17 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "ModuleBase_ViewerFilters.h" #include "ModuleBase_IWorkshop.h" #include "ModuleBase_IModule.h" +#include "ModuleBase_Operation.h" +#include "ModuleBase_IPropertyPanel.h" +#include "ModuleBase_ModelWidget.h" #include #include @@ -77,7 +79,13 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk( if (aObj) { DocumentPtr aDoc = aObj->document(); SessionPtr aMgr = ModelAPI_Session::get(); - aValid = (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument()); + + if (anOperation->propertyPanel()) { + ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget(); + if (aWidget && aWidget->canUseExternalParts()) + return Standard_True; + } + return (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument()); } else { // This object is not controlled by the filter