-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022 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
#include <ModuleBase_ActionInfo.h>
#include <ModuleBase_Tools.h>
+#include <ModelAPI_ResultGroup.h>
#include <ModelAPI_ResultPart.h>
#include <ModelAPI_ResultConstruction.h>
#include <ModelAPI_ResultBody.h>
#include <Config_FeatureMessage.h>
#include <Events_Loop.h>
-#include <CollectionPlugin_Group.h>
-
QMap<QString, QString> PartSet_IconFactory::myIcons;
PartSet_IconFactory::PartSet_IconFactory(PartSet_Module* theModule)
if(aShape.get()) {
switch(aShape->shapeType()) {
case GeomAPI_Shape::COMPOUND: {
- FeaturePtr aFeature = ModelAPI_Feature::feature(theObj);
- if (aFeature.get() && aFeature->getKind() == CollectionPlugin_Group::ID()) {
+ if (aResult->groupName() == ModelAPI_ResultGroup::group()) {
switch (aShape->typeOfCompoundShapes()) {
case GeomAPI_Shape::VERTEX:
return QIcon(":icons/group_vertex.png");
return QIcon(":icons/group_face.png");
case GeomAPI_Shape::SOLID:
return QIcon(":icons/group_solid.png");
+ default: // [to avoid compilation warning]
+ break;
}
}
ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
case GeomAPI_Shape::WIRE: return QIcon(":pictures/wire.png");
case GeomAPI_Shape::EDGE: return QIcon(":pictures/edge.png");
case GeomAPI_Shape::VERTEX: return QIcon(":pictures/vertex.png");
+ default: // [to avoid compilation warning]
+ break;
}
}
}
Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
- if (!aFeatureMsg->isInternal()) {
- ActionInfo aFeatureInfo;
- aFeatureInfo.initFrom(aFeatureMsg);
- // Remember features icons
- myIcons[QString::fromStdString(aFeatureMsg->id())] = aFeatureInfo.iconFile;
- }
+ ActionInfo aFeatureInfo;
+ aFeatureInfo.initFrom(aFeatureMsg);
+ // Remember features icons
+ myIcons[QString::fromStdString(aFeatureMsg->id())] = aFeatureInfo.iconFile;
}
}
\ No newline at end of file