PD: fixes #6451: Face color of PartDesign Body not exported to STEP
This commit is contained in:
@@ -529,6 +529,11 @@ void Body::onDocumentRestored()
|
||||
static_cast<PartDesign::Feature*>(obj)->_Body.setValue(this);
|
||||
}
|
||||
_GroupTouched.setStatus(App::Property::Output,true);
|
||||
|
||||
// trigger ViewProviderBody::copyColorsfromTip
|
||||
if (Tip.getValue())
|
||||
Tip.touch();
|
||||
|
||||
DocumentObject::onDocumentRestored();
|
||||
}
|
||||
|
||||
|
||||
@@ -227,11 +227,22 @@ void ViewProviderBody::updateData(const App::Property* prop)
|
||||
static_cast<PartDesignGui::ViewProvider*>(vp)->setTipIcon(feature == tip);
|
||||
}
|
||||
}
|
||||
|
||||
if (tip)
|
||||
copyColorsfromTip(tip);
|
||||
}
|
||||
|
||||
PartGui::ViewProviderPart::updateData(prop);
|
||||
}
|
||||
|
||||
void ViewProviderBody::copyColorsfromTip(App::DocumentObject* tip) {
|
||||
// update DiffuseColor
|
||||
Gui::ViewProvider* vptip = Gui::Application::Instance->getViewProvider(tip);
|
||||
if (vptip && vptip->isDerivedFrom(PartGui::ViewProviderPartExt::getClassTypeId())) {
|
||||
auto colors = static_cast<PartGui::ViewProviderPartExt*>(vptip)->DiffuseColor.getValues();
|
||||
this->DiffuseColor.setValues(colors);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderBody::slotChangedObjectApp ( const App::DocumentObject& obj, const App::Property& prop ) {
|
||||
|
||||
|
||||
@@ -94,6 +94,10 @@ protected:
|
||||
void unifyVisualProperty(const App::Property* prop);
|
||||
/// Set Feature viewprovider into visual body mode
|
||||
void setVisualBodyMode(bool bodymode);
|
||||
|
||||
private:
|
||||
void copyColorsfromTip(App::DocumentObject* tip);
|
||||
|
||||
private:
|
||||
static const char* BodyModeEnum[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user