Fem: use SoAnnotation to highlight result pipeline objects

This commit is contained in:
wmayer
2022-07-31 17:51:31 +02:00
parent 47c2e77ebf
commit 8bb85d2b7c
6 changed files with 111 additions and 4 deletions

View File

@@ -522,6 +522,11 @@ void ViewProviderFemPostObject::setRangeOfColorBar(double min, double max)
}
}
void ViewProviderFemPostObject::updateMaterial()
{
WriteColorData(true);
}
void ViewProviderFemPostObject::WriteColorData(bool ResetColorBarRange) {
if (!setupPipeline())
@@ -801,7 +806,7 @@ bool ViewProviderFemPostObject::canDelete(App::DocumentObject* obj) const
// thus we can pass this action
// we can warn the user if necessary in the object's ViewProvider in the onDelete() function
Q_UNUSED(obj)
return true;
return true;
}
void ViewProviderFemPostObject::onSelectionChanged(const Gui::SelectionChanges &sel)
@@ -810,8 +815,8 @@ void ViewProviderFemPostObject::onSelectionChanged(const Gui::SelectionChanges &
// color bar.
// But don't do this if the object is invisible because other objects with a
// color bar might be visible and the color bar is then wrong.
if (sel.Type == sel.AddSelection) {
if (sel.Type == Gui::SelectionChanges::AddSelection) {
if (this->getObject()->Visibility.getValue())
WriteColorData(true);
updateMaterial();
}
}