+ fix typos + improve whitespaces
This commit is contained in:
parent
d03a8fd386
commit
de47702b17
|
@ -64,7 +64,7 @@ App::DocumentObjectExecReturn* ShapeBinder::execute(void) {
|
||||||
Part::Feature* obj = nullptr;
|
Part::Feature* obj = nullptr;
|
||||||
std::vector<std::string> subs;
|
std::vector<std::string> 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 we have a link we rebuild the shape, but we change nothing if we are a simple copy
|
||||||
if(obj) {
|
if(obj) {
|
||||||
Shape.setValue(ShapeBinder::buildShapeFromReferences(obj, subs)._Shape);
|
Shape.setValue(ShapeBinder::buildShapeFromReferences(obj, subs)._Shape);
|
||||||
|
@ -75,7 +75,7 @@ App::DocumentObjectExecReturn* ShapeBinder::execute(void) {
|
||||||
return Part::Feature::execute();
|
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;
|
obj = nullptr;
|
||||||
subobjects.clear();
|
subobjects.clear();
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
App::PropertyLinkSubList Support;
|
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);
|
static Part::TopoShape buildShapeFromReferences(Feature* obj, std::vector< std::string > subs);
|
||||||
|
|
||||||
const char* getViewProviderName(void) const {
|
const char* getViewProviderName(void) const {
|
||||||
|
|
|
@ -82,7 +82,7 @@ TaskShapeBinder::TaskShapeBinder(ViewProviderShapeBinder *view,bool newObj, QWid
|
||||||
Part::Feature* obj = nullptr;
|
Part::Feature* obj = nullptr;
|
||||||
std::vector<std::string> subs;
|
std::vector<std::string> subs;
|
||||||
|
|
||||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, subs);
|
PartDesign::ShapeBinder::getFilteredReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, subs);
|
||||||
|
|
||||||
if(obj)
|
if(obj)
|
||||||
ui->baseEdit->setText(QString::fromUtf8(obj->getNameInDocument()));
|
ui->baseEdit->setText(QString::fromUtf8(obj->getNameInDocument()));
|
||||||
|
@ -229,7 +229,7 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const {
|
||||||
Part::Feature* obj = nullptr;
|
Part::Feature* obj = nullptr;
|
||||||
std::vector<std::string> refs;
|
std::vector<std::string> refs;
|
||||||
|
|
||||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support, obj, refs);
|
PartDesign::ShapeBinder::getFilteredReferences(&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 we already have a object we need to ensure th new selected subref belongs to it
|
||||||
if(obj && strcmp(msg.pObjectName, obj->getNameInDocument()) != 0)
|
if(obj && strcmp(msg.pObjectName, obj->getNameInDocument()) != 0)
|
||||||
|
@ -248,14 +248,14 @@ bool TaskShapeBinder::referenceSelected(const SelectionChanges& msg) const {
|
||||||
refs.erase(f);
|
refs.erase(f);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
refs.clear();
|
refs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support.setValue(obj, refs);
|
static_cast<PartDesign::ShapeBinder*>(vp->getObject())->Support.setValue(obj, refs);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,17 +128,17 @@ void ViewProviderShapeBinder::highlightReferences(const bool on, bool auxillery)
|
||||||
|
|
||||||
Part::Feature* obj;
|
Part::Feature* obj;
|
||||||
std::vector<std::string> subs;
|
std::vector<std::string> subs;
|
||||||
|
|
||||||
if(getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId()))
|
if(getObject()->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId()))
|
||||||
PartDesign::ShapeBinder::getFilterdReferences(&static_cast<PartDesign::ShapeBinder*>(getObject())->Support, obj, subs);
|
PartDesign::ShapeBinder::getFilteredReferences(&static_cast<PartDesign::ShapeBinder*>(getObject())->Support, obj, subs);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PartGui::ViewProviderPart* svp = dynamic_cast<PartGui::ViewProviderPart*>(
|
PartGui::ViewProviderPart* svp = dynamic_cast<PartGui::ViewProviderPart*>(
|
||||||
Gui::Application::Instance->getViewProvider(obj));
|
Gui::Application::Instance->getViewProvider(obj));
|
||||||
if (svp == NULL) return;
|
if (svp == NULL) return;
|
||||||
|
|
||||||
if (on) {
|
if (on) {
|
||||||
if (!subs.empty() && originalLineColors.empty()) {
|
if (!subs.empty() && originalLineColors.empty()) {
|
||||||
TopTools_IndexedMapOfShape eMap;
|
TopTools_IndexedMapOfShape eMap;
|
||||||
TopExp::MapShapes(obj->Shape.getValue(), TopAbs_EDGE, eMap);
|
TopExp::MapShapes(obj->Shape.getValue(), TopAbs_EDGE, eMap);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user