X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationFeatureEdit.cpp;h=7975baa652d223a39a1765023498965bc8b29277;hb=09360d321e48c3749afa582c0958a28ea7bf9200;hp=5782ca1ba5d974b38d26410b77c32d19e694f500;hpb=5d9f5c6e19b94b5b2c4bf8d314b7f7f1c6f49897;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationFeatureEdit.cpp b/src/PartSet/PartSet_OperationFeatureEdit.cpp index 5782ca1ba..7975baa65 100644 --- a/src/PartSet/PartSet_OperationFeatureEdit.cpp +++ b/src/PartSet/PartSet_OperationFeatureEdit.cpp @@ -53,7 +53,7 @@ bool PartSet_OperationFeatureEdit::isGranted(ModuleBase_IOperation* theOperation return theOperation->getDescription()->operationId().toStdString() == PartSet_OperationSketch::Type(); } -std::list PartSet_OperationFeatureEdit::getSelectionModes(FeaturePtr theFeature) const +std::list PartSet_OperationFeatureEdit::getSelectionModes(ObjectPtr theFeature) const { return PartSet_OperationSketchBase::getSelectionModes(theFeature); } @@ -73,22 +73,20 @@ void PartSet_OperationFeatureEdit::mousePressed(QMouseEvent* theEvent, Handle(V3 const std::list& theSelected, const std::list& 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 aSelected; aSelected.push_back(feature()); - aSelected.push_back(theHighlighted.front().feature()); + aSelected.push_back(theHighlighted.front().object()); emit setSelection(aSelected); } else if (aFeature) { @@ -173,11 +171,11 @@ void PartSet_OperationFeatureEdit::blockSelection(bool isBlocked, const bool isR return; myIsBlockedSelection = isBlocked; - QFeatureList aFeatureList; + QList aFeatureList; aFeatureList.append(feature()); if (isBlocked) { - emit setSelection(QFeatureList()); + emit setSelection(QList()); emit stopSelection(aFeatureList, true); } else { @@ -195,7 +193,7 @@ FeaturePtr PartSet_OperationFeatureEdit::createFeature(const bool /*theFlushMess 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);