Mod: code cleanup
This commit is contained in:
@@ -353,7 +353,6 @@ ViewProviderMesh::~ViewProviderMesh()
|
||||
void ViewProviderMesh::onChanged(const App::Property* prop)
|
||||
{
|
||||
// we're going to change the number of colors to one
|
||||
// if (prop == &ShapeAppearance || prop == &ShapeMaterial) {
|
||||
if (prop == &ShapeAppearance) {
|
||||
pcMatBinding->value = SoMaterialBinding::OVERALL;
|
||||
}
|
||||
@@ -397,9 +396,6 @@ void ViewProviderMesh::onChanged(const App::Property* prop)
|
||||
if (prop == &ShapeAppearance) {
|
||||
setOpenEdgeColorFrom(ShapeAppearance.getDiffuseColor());
|
||||
}
|
||||
// else if (prop == &ShapeMaterial) {
|
||||
// setOpenEdgeColorFrom(ShapeMaterial.getValue().diffuseColor);
|
||||
// }
|
||||
}
|
||||
|
||||
ViewProviderGeometryObject::onChanged(prop);
|
||||
|
||||
@@ -716,22 +716,20 @@ void PartGui::DlgProjectionOnSurface::higlight_object(Part::Feature* iCurrentObj
|
||||
}
|
||||
auto index = anIndices.FindIndex(currentShape);
|
||||
|
||||
//set color
|
||||
PartGui::ViewProviderPartExt* vp = dynamic_cast<PartGui::ViewProviderPartExt*>(Gui::Application::Instance->getViewProvider(iCurrentObject));
|
||||
if (vp)
|
||||
{
|
||||
std::vector<App::Color> colors;
|
||||
App::Color defaultColor;
|
||||
if (currentShapeType == TopAbs_FACE)
|
||||
{
|
||||
colors = vp->DiffuseColor.getValues();
|
||||
defaultColor = vp->ShapeAppearance.getDiffuseColor();
|
||||
}
|
||||
else if ( currentShapeType == TopAbs_EDGE )
|
||||
{
|
||||
colors = vp->LineColorArray.getValues();
|
||||
defaultColor = vp->LineColor.getValue();
|
||||
}
|
||||
// set color
|
||||
auto vp = dynamic_cast<PartGui::ViewProviderPartExt*>(
|
||||
Gui::Application::Instance->getViewProvider(iCurrentObject));
|
||||
if (vp) {
|
||||
std::vector<App::Color> colors;
|
||||
App::Color defaultColor;
|
||||
if (currentShapeType == TopAbs_FACE) {
|
||||
colors = vp->DiffuseColor.getValues();
|
||||
defaultColor = vp->ShapeAppearance.getDiffuseColor();
|
||||
}
|
||||
else if (currentShapeType == TopAbs_EDGE) {
|
||||
colors = vp->LineColorArray.getValues();
|
||||
defaultColor = vp->LineColor.getValue();
|
||||
}
|
||||
|
||||
if (static_cast<Standard_Integer>(colors.size()) != anIndices.Extent()) {
|
||||
colors.resize(anIndices.Extent(), defaultColor);
|
||||
|
||||
Reference in New Issue
Block a user