connect(aSubMenu, SIGNAL(hovered(QAction*)), SLOT(onLineHighlighted(QAction*)));
connect(aSubMenu, SIGNAL(aboutToHide()), SLOT(onDetachMenuHide()));
connect(aSubMenu, SIGNAL(triggered(QAction*)), SLOT(onLineDetach(QAction*)));
- }
+ }
}
}
}
}
-void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList,
+void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList,
std::shared_ptr<GeomAPI_Pnt2d>& theRefPnt,
QObjectPtrList& theOutList)
{
for (aIt = theRefList.cbegin(); aIt != theRefList.cend(); ++aIt) {
std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
- if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
+ if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
std::shared_ptr<GeomAPI_Pnt2d> aPnt = PartSet_Tools::getCoincedencePoint(aConstrFeature);
if (aPnt.get() == NULL)
return;
gp_Pnt aP = aPnt->impl<gp_Pnt>();
if (theRefPnt->isEqual(aPnt) && (!theOutList.contains(aConstrFeature))) {
theOutList.append(aConstrFeature);
- }
+ }
}
}
}
std::shared_ptr<GeomAPI_Pnt2d> aOrig = PartSet_Tools::getCoincedencePoint(mySelectedFeature);
if (!aOrig.get())
return;
-
+
const std::set<AttributePtr>& aRefsList = aLine->data()->refsToMe();
QObjectPtrList aToDelFeatures;
anOpMgr->startOperation(anOpAction);
aWorkshop->deleteFeatures(aToDelFeatures);
-
+
anOpMgr->commitOperation();
}
myCoinsideLines.clear();
myPrevId = -1;
}
-
+
void PartSet_MenuMgr::setAuxiliary(const bool isChecked)
{
ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation();
if (aSketchFeature.get() != NULL) {
std::string anAttribute = SketchPlugin_SketchEntity::AUXILIARY_ID();
- std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
+ std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(
aSketchFeature->data()->attribute(anAttribute));
if (anAuxiliaryAttr)
if (aSketchFeature.get() != NULL) {
std::string anAttribute = SketchPlugin_SketchEntity::AUXILIARY_ID();
- std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
+ std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(
aSketchFeature->data()->attribute(anAttribute));
if (anAuxiliaryAttr)
QObjectPtrList aObjects = myModule->workshop()->selection()->selectedObjects();
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObjects.first());
if (aFeature == NULL) {
- ResultParameterPtr aParam =
+ ResultParameterPtr aParam =
std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aObjects.first());
if (aParam.get() != NULL) {
aFeature = ModelAPI_Feature::feature(aParam);