PD: fix shape appearance of datum features, shape binder and sub-shape binder
This commit is contained in:
@@ -101,6 +101,10 @@ ViewProviderDatum::~ViewProviderDatum()
|
||||
|
||||
void ViewProviderDatum::attach(App::DocumentObject *obj)
|
||||
{
|
||||
if (auto geo = dynamic_cast<App::GeoFeature*>(obj)) {
|
||||
geo->setMaterialAppearance(ShapeAppearance[0]);
|
||||
}
|
||||
|
||||
ViewProviderGeometryObject::attach ( obj );
|
||||
|
||||
// TODO remove this field (2015-09-08, Fat-Zer)
|
||||
|
||||
@@ -125,6 +125,14 @@ void ViewProviderShapeBinder::unsetEdit(int ModNum) {
|
||||
PartGui::ViewProviderPart::unsetEdit(ModNum);
|
||||
}
|
||||
|
||||
void ViewProviderShapeBinder::attach(App::DocumentObject *obj)
|
||||
{
|
||||
if (auto geo = dynamic_cast<App::GeoFeature*>(obj)) {
|
||||
geo->setMaterialAppearance(ShapeAppearance[0]);
|
||||
}
|
||||
ViewProviderPart::attach(obj);
|
||||
}
|
||||
|
||||
void ViewProviderShapeBinder::highlightReferences(bool on)
|
||||
{
|
||||
App::GeoFeature* obj = nullptr;
|
||||
@@ -221,6 +229,9 @@ ViewProviderSubShapeBinder::ViewProviderSubShapeBinder() {
|
||||
void ViewProviderSubShapeBinder::attach(App::DocumentObject* obj) {
|
||||
|
||||
UseBinderStyle.setValue(boost::istarts_with(obj->getNameInDocument(), "binder"));
|
||||
if (auto geo = dynamic_cast<App::GeoFeature*>(obj)) {
|
||||
geo->setMaterialAppearance(ShapeAppearance[0]);
|
||||
}
|
||||
ViewProviderPart::attach(obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
protected:
|
||||
bool setEdit(int ModNum) override;
|
||||
void unsetEdit(int ModNum) override;
|
||||
void attach(App::DocumentObject *obj) override;
|
||||
|
||||
private:
|
||||
std::vector<App::Color> originalLineColors;
|
||||
|
||||
Reference in New Issue
Block a user