Remove ShapeBinder2D
As profile based features can work with faces and wires now ShapeBinder can do everything that needed ShapeBinder2D before.
This commit is contained in:
@@ -82,11 +82,8 @@ TaskShapeBinder::TaskShapeBinder(ViewProviderShapeBinder *view,bool newObj, QWid
|
||||
Part::Feature* obj = nullptr;
|
||||
std::vector<std::string> subs;
|
||||
|
||||
if(vp->getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId()))
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, subs);
|
||||
else
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder2D*>(vp->getObject())->Support, obj, subs);
|
||||
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, subs);
|
||||
|
||||
if(obj)
|
||||
ui->baseEdit->setText(QString::fromUtf8(obj->getNameInDocument()));
|
||||
|
||||
@@ -232,10 +229,7 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const {
|
||||
Part::Feature* obj = nullptr;
|
||||
std::vector<std::string> refs;
|
||||
|
||||
if(vp->getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId()))
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, refs);
|
||||
else
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder2D*>(vp->getObject())->Support, obj, refs);
|
||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(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)
|
||||
@@ -260,11 +254,8 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const {
|
||||
refs.clear();
|
||||
}
|
||||
|
||||
if(vp->getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId()))
|
||||
static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support.setValue(obj, refs);
|
||||
else
|
||||
static_cast<PartDesign::ShapeBinder2D*>(vp->getObject())->Support.setValue( obj, refs);
|
||||
|
||||
static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support.setValue(obj, refs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user