X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetMultiSelector.cpp;h=60d3d4a82baeadff22ad8ab7cfdbfdb9c301463e;hb=3ef3b583309df4b9d0593c7abd181ab9d6fed42e;hp=322864def53255c89d57168cd4e65cf3358f7c6f;hpb=423c10234142d14d0d5de89383f2f96a4ec5930f;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetMultiSelector.cpp b/src/PartSet/PartSet_WidgetMultiSelector.cpp index 322864def..60d3d4a82 100755 --- a/src/PartSet/PartSet_WidgetMultiSelector.cpp +++ b/src/PartSet/PartSet_WidgetMultiSelector.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: PartSet_WidgetMultiSelector.cpp -// Created: 15 Apr 2015 -// Author: Natalia Ermolaeva +// Copyright (C) 2014-2017 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #include "PartSet_WidgetMultiSelector.h" @@ -20,6 +34,7 @@ #include +#include #include #include #include @@ -47,7 +62,13 @@ PartSet_WidgetMultiSelector::~PartSet_WidgetMultiSelector() //******************************************************************** bool PartSet_WidgetMultiSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs) { - bool aValid = ModuleBase_WidgetMultiSelector::isValidSelectionCustom(thePrs); + bool aValid = false; + if (thePrs.get() && thePrs->interactive().get() && + thePrs->interactive()->IsKind(STANDARD_TYPE(PartSet_CenterPrs))) + aValid = true; // we should not check acceptSubShape for such presentation + else + aValid = ModuleBase_WidgetMultiSelector::isValidSelectionCustom(thePrs); + if (aValid) { ObjectPtr anObject = myWorkshop->selection()->getResult(thePrs); aValid = myExternalObjectMgr->isValidObject(anObject);