return theOperation->getDescription()->operationId().toStdString() == PartSet_OperationSketch::Type();
}
-std::list<int> PartSet_OperationFeatureEdit::getSelectionModes(FeaturePtr theFeature) const
+std::list<int> PartSet_OperationFeatureEdit::getSelectionModes(ObjectPtr theFeature) const
{
return PartSet_OperationSketchBase::getSelectionModes(theFeature);
}
const std::list<ModuleBase_ViewerPrs>& theSelected,
const std::list<ModuleBase_ViewerPrs>& theHighlighted)
{
- FeaturePtr aFeature;
+ ObjectPtr aFeature;
if (!theHighlighted.empty())
- aFeature = theHighlighted.front().feature();
+ aFeature = theHighlighted.front().object();
if (!aFeature && !theSelected.empty()) // changed for a constrain
- aFeature = theSelected.front().feature();
-
- if (!aFeature || aFeature != feature())
- {
+ aFeature = theSelected.front().object();
+ if (!aFeature || aFeature != feature()) {
commit();
emit featureConstructed(feature(), FM_Deactivation);
bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
if(aHasShift && !theHighlighted.empty()) {
- QFeatureList aSelected;
+ QList<ObjectPtr> aSelected;
aSelected.push_back(feature());
- aSelected.push_back(theHighlighted.front().feature());
+ aSelected.push_back(theHighlighted.front().object());
emit setSelection(aSelected);
}
else if (aFeature) {
return;
myIsBlockedSelection = isBlocked;
- QFeatureList aFeatureList;
+ QList<ObjectPtr> aFeatureList;
aFeatureList.append(feature());
if (isBlocked) {
- emit setSelection(QFeatureList());
+ emit setSelection(QList<ObjectPtr>());
emit stopSelection(aFeatureList, true);
}
else {
void PartSet_OperationFeatureEdit::sendFeatures()
{
- static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_MOVED);
+ static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_MOVED);
FeaturePtr aFeature = feature();
ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);