From 4e00d9dac974531d87069933c8ff7bde9f411cf0 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 12 Mar 2018 23:17:04 +0100 Subject: [PATCH] FEM: vtk post processing, add a workaround check for back light --- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp index 8412610081..bb7a0deccf 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp @@ -546,6 +546,13 @@ void ViewProviderFemPostObject::onChanged(const App::Property* prop) { } bool ViewProviderFemPostObject::doubleClicked(void) { + // work around for a problme in VTK implementation: https://forum.freecadweb.org/viewtopic.php?t=10587&start=130#p125688 + // check if backlight is enabled + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + bool isBackLightEnabled = hGrp->GetBool("EnableBacklight", false); + if (isBackLightEnabled == false) + Base::Console().Error("Back light is not enabled. Due to a VTK implemataion problem you really should consider to enable back light in FreeCAD display preferences if you work with VTK post processing.\n"); + // set edit Gui::Application::Instance->activeDocument()->setEdit(this, (int)ViewProvider::Default); return true; }