diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index e5dca7994..9a720b156 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -64,7 +64,7 @@ App::DocumentObjectExecReturn* ShapeBinder::execute(void) { Part::Feature* obj = nullptr; std::vector subs; - ShapeBinder::getFilterdReferences(&Support, obj, subs); + ShapeBinder::getFilteredReferences(&Support, obj, subs); //if we have a link we rebuild the shape, but we change nothing if we are a simple copy if(obj) { Shape.setValue(ShapeBinder::buildShapeFromReferences(obj, subs)._Shape); @@ -75,7 +75,7 @@ App::DocumentObjectExecReturn* ShapeBinder::execute(void) { return Part::Feature::execute(); } -void ShapeBinder::getFilterdReferences(App::PropertyLinkSubList* prop, Part::Feature*& obj, std::vector< std::string >& subobjects) { +void ShapeBinder::getFilteredReferences(App::PropertyLinkSubList* prop, Part::Feature*& obj, std::vector< std::string >& subobjects) { obj = nullptr; subobjects.clear(); diff --git a/src/Mod/PartDesign/App/ShapeBinder.h b/src/Mod/PartDesign/App/ShapeBinder.h index f361608b8..0adc96d7d 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.h +++ b/src/Mod/PartDesign/App/ShapeBinder.h @@ -49,7 +49,7 @@ public: App::PropertyLinkSubList Support; - static void getFilterdReferences(App::PropertyLinkSubList* prop, Part::Feature*& object, std::vector< std::string >& subobjects); + static void getFilteredReferences(App::PropertyLinkSubList* prop, Part::Feature*& object, std::vector< std::string >& subobjects); static Part::TopoShape buildShapeFromReferences(Feature* obj, std::vector< std::string > subs); const char* getViewProviderName(void) const { diff --git a/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp b/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp index 4513cef95..864baf30d 100644 --- a/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/TaskShapeBinder.cpp @@ -82,7 +82,7 @@ TaskShapeBinder::TaskShapeBinder(ViewProviderShapeBinder *view,bool newObj, QWid Part::Feature* obj = nullptr; std::vector subs; - PartDesign::ShapeBinder::getFilterdReferences(&static_cast(vp->getObject())->Support, obj, subs); + PartDesign::ShapeBinder::getFilteredReferences(&static_cast(vp->getObject())->Support, obj, subs); if(obj) ui->baseEdit->setText(QString::fromUtf8(obj->getNameInDocument())); @@ -229,7 +229,7 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const { Part::Feature* obj = nullptr; std::vector refs; - PartDesign::ShapeBinder::getFilterdReferences(&static_cast(vp->getObject())->Support, obj, refs); + PartDesign::ShapeBinder::getFilteredReferences(&static_cast(vp->getObject())->Support, obj, refs); //if we already have a object we need to ensure th new selected subref belongs to it if(obj && strcmp(msg.pObjectName, obj->getNameInDocument()) != 0) @@ -248,14 +248,14 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const { refs.erase(f); else return false; - } + } } else { refs.clear(); } - static_cast(vp->getObject())->Support.setValue(obj, refs); - + static_cast(vp->getObject())->Support.setValue(obj, refs); + return true; } diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp index d50254d4d..0c86910d2 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp @@ -128,17 +128,17 @@ void ViewProviderShapeBinder::highlightReferences(const bool on, bool auxillery) Part::Feature* obj; std::vector subs; - + if(getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId())) - PartDesign::ShapeBinder::getFilterdReferences(&static_cast(getObject())->Support, obj, subs); - else + PartDesign::ShapeBinder::getFilteredReferences(&static_cast(getObject())->Support, obj, subs); + else return; - + PartGui::ViewProviderPart* svp = dynamic_cast( Gui::Application::Instance->getViewProvider(obj)); if (svp == NULL) return; - if (on) { + if (on) { if (!subs.empty() && originalLineColors.empty()) { TopTools_IndexedMapOfShape eMap; TopExp::MapShapes(obj->Shape.getValue(), TopAbs_EDGE, eMap);