-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File: PartSet_CustomPrs.cpp
-// Created: 30 Jun 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<mailto:webmaster.salome@opencascade.com>
+//
#include <PartSet_CustomPrs.h>
#include <PartSet_Module.h>
break;
case ModuleBase_IModule::CustomizeResults:
PartSet_OperationPrs::getResultShapes(myFeature, myWorkshop, aFeatureShapes);
+ PartSet_OperationPrs::getPresentationShapes(myFeature, myWorkshop, aFeatureShapes, false);
break;
case ModuleBase_IModule::CustomizeHighlightedObjects:
PartSet_OperationPrs::getHighlightedShapes(myWorkshop, aFeatureShapes);
default:
return isModified;
}
- NCollection_DataMap<TopoDS_Shape, Handle_AIS_InteractiveObject>& aShapeMap =
+ NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)>& aShapeMap =
anOperationPrs->shapesMap();
PartSet_OperationPrs::fillShapeList(aFeatureShapes, myWorkshop, aShapeMap);
return isModified;
}
-bool PartSet_CustomPrs::erasePresentation(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
- const bool theUpdateViewer)
+bool PartSet_CustomPrs::erasePresentation(
+ const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
+ const bool theUpdateViewer)
{
bool isErased = false;
XGUI_Workshop* aWorkshop = workshop();
return isErased;
}
-void PartSet_CustomPrs::clearPresentation(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag)
+void PartSet_CustomPrs::clearPresentation(
+ const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag)
{
AISObjectPtr aPresentation = getPresentation(theFlag, false);
if (aPresentation.get()) {
AISObjectPtr anOperationPrs;
if (myPresentations.contains(theFlag))
anOperationPrs = myPresentations[theFlag];
-
+
if (!anOperationPrs.get() && theToCreate) {
initPresentation(theFlag);
anOperationPrs = myPresentations[theFlag];
bool aRedisplayed = false;
if (myIsActive[theFlag])
aRedisplayed = displayPresentation(theFlag, theUpdateViewer);
-
+
return aRedisplayed;
}
myPresentationIsEmpty = true; /// store state to analize it after display/erase is finished
}
-void PartSet_CustomPrs::initPresentation(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag)
+void PartSet_CustomPrs::initPresentation(
+ const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag)
{
AISObjectPtr anOperationPrs = AISObjectPtr(new GeomAPI_AISObject());
Handle(PartSet_OperationPrs) anAISPrs = new PartSet_OperationPrs(myWorkshop);
Quantity_Color aColor;
switch(theFlag) {
case ModuleBase_IModule::CustomizeArguments:
- aColor = ModuleBase_Tools::color("Visualization", "operation_parameter_color",
- OPERATION_PARAMETER_COLOR());
+ aColor = ModuleBase_Tools::color("Visualization", "operation_parameter_color");
break;
case ModuleBase_IModule::CustomizeResults:
- aColor = ModuleBase_Tools::color("Visualization", "operation_result_color",
- OPERATION_RESULT_COLOR());
+ aColor = ModuleBase_Tools::color("Visualization", "operation_result_color");
break;
case ModuleBase_IModule::CustomizeHighlightedObjects:
- aColor = ModuleBase_Tools::color("Visualization", "operation_highlight_color",
- OPERATION_HIGHLIGHT_COLOR());
+ aColor = ModuleBase_Tools::color("Visualization", "operation_highlight_color");
break;
default:
break;