-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-/*
- * ModuleBase_OperationFeature.cpp
- *
- * Created on: Apr 2, 2014
- * Author: sbh
- */
+// 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<mailto:webmaster.salome@opencascade.com>
+//
#include "ModuleBase_OperationFeature.h"
return true;
std::string anError = ModelAPI_Tools::getFeatureError(myFeature);
- ModuleBase_Tools::translate(myFeature->getKind(), anError);
+ //ModuleBase_Tools::translate(myFeature->getKind(), anError);
return anError.empty();
}
}
#ifdef DEBUG_DO_NOT_ACTIVATE_SUB_FEATURE
if (aFeature->isMacro()) {
- // macro feature may refers to sub-features, which also should be deactivated when the operation
+ // macro feature may refers to sub-features,
+ // which also should be deactivated when the operation
// is active, e.g. rectangle'lines.
FeaturePtr anObjectFeature = ModelAPI_Feature::feature(theObj);
std::list<AttributePtr> anAttributes = aFeature->data()->attributes(
ModelAPI_AttributeRefList::typeId());
- std::list<AttributePtr>::const_iterator anIt = anAttributes.begin(), aLast = anAttributes.end();
+ std::list<AttributePtr>::const_iterator
+ anIt = anAttributes.begin(), aLast = anAttributes.end();
bool aFoundObject = false;
for (; anIt != aLast && !aFoundObject; anIt++) {
std::shared_ptr<ModelAPI_AttributeRefList> aCurSelList =
- std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anIt);
+ std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anIt);
for (int i = 0, aNb = aCurSelList->size(); i < aNb && !aFoundObject; i++) {
ObjectPtr anObject = aCurSelList->object(i);
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObject);
return myPreviousCurrentFeature;
}
-void ModuleBase_OperationFeature::initSelection(const QList<ModuleBase_ViewerPrsPtr>& thePreSelected)
+void ModuleBase_OperationFeature::initSelection(
+ const QList<ModuleBase_ViewerPrsPtr>& thePreSelected)
{
QObjectPtrList aCurrentFeatureResults;
for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt)
aCurrentFeatureResults.append(*aIt);
}
-
+
if (aCurrentFeatureResults.empty()) /// filtering of selection is not necessary
setPreselection(thePreSelected);
else { // create preselection list without results of current feature
myPreSelection.clear();
}
-void ModuleBase_OperationFeature::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
+void ModuleBase_OperationFeature::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
{
ModuleBase_Operation::setPropertyPanel(theProp);
}
// Do not activate widgets by default if the current operation is editing operation
- // Because we don't know which widget is going to be edited.
+ // Because we don't know which widget is going to be edited.
if (!isEditOperation()) {
// 4. activate the first obligatory widget
theProp->activateNextWidget(NULL);