+ set shape color when reading STEP with colors

This commit is contained in:
wmayer 2015-04-12 12:43:21 +02:00
parent 708f6665e6
commit 52db9a6cff
2 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,7 @@ open(PyObject *self, PyObject *args)
}
}
else
Py_Error(Base::BaseExceptionFreeCADError,"Could not load image");
Py_Error(PyExc_IOError, "Could not load image file");
// Displaying the image in a view.
// This ImageView object takes ownership of the pixel data (in 'pointImageTo') so we don't need to delete it here
@ -87,7 +87,7 @@ open(PyObject *self, PyObject *args)
} PY_CATCH;
Py_Return;
Py_Return;
}

View File

@ -96,6 +96,7 @@ private:
{
Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(part);
if (vp && vp->isDerivedFrom(PartGui::ViewProviderPartExt::getClassTypeId())) {
static_cast<PartGui::ViewProviderPartExt*>(vp)->ShapeColor.setValue(colors.front());
static_cast<PartGui::ViewProviderPartExt*>(vp)->DiffuseColor.setValues(colors);
}
}