diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp index 15b3efe31e..74e3eea236 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp @@ -664,11 +664,20 @@ void ViewProviderFemPostObject::unsetEdit(int ModNum) { void ViewProviderFemPostObject::hide(void) { Gui::ViewProviderDocumentObject::hide(); m_colorStyle->style = SoDrawStyle::INVISIBLE; + // TODO: the object is now hidden but the color bar is wrong + // if there are other FemPostObjects visible + // one must first search if there are other FemPostObjects visible + // in the tree view above this one and refresh ist color bar by updating + // its Field property + // if this is not the case, the colorbar of the next visible FemPostObjects + // has t be refreshed } void ViewProviderFemPostObject::show(void) { Gui::ViewProviderDocumentObject::show(); m_colorStyle->style = SoDrawStyle::FILLED; + // we must update the color bar + WriteColorData(true); } @@ -727,10 +736,7 @@ void ViewProviderFemPostObject::selectionChanged(const Gui::SelectionChanges &se if (obj.getObject() == this->getObject()) { if (!this->getObject()->Visibility.getValue()) return; - auto propField = Base::freecad_dynamic_cast( - getPropertyByName("Field")); - if (propField) - propField->touch(); + WriteColorData(true); } } }