Mod: code cleanup
This commit is contained in:
@@ -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