diff --git a/src/Mod/Image/Gui/AppImageGuiPy.cpp b/src/Mod/Image/Gui/AppImageGuiPy.cpp index d1ff60403..f9fef2a3b 100644 --- a/src/Mod/Image/Gui/AppImageGuiPy.cpp +++ b/src/Mod/Image/Gui/AppImageGuiPy.cpp @@ -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; } diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index fcf515de1..941393eff 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -96,6 +96,7 @@ private: { Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(part); if (vp && vp->isDerivedFrom(PartGui::ViewProviderPartExt::getClassTypeId())) { + static_cast(vp)->ShapeColor.setValue(colors.front()); static_cast(vp)->DiffuseColor.setValues(colors); } }