Core: Update color bar when changing preferences

This solves one part of issue #10717
This commit is contained in:
wmayer
2024-06-30 22:32:44 +02:00
committed by Chris Hennes
parent 0a39ab952d
commit d64bf15f8a
10 changed files with 202 additions and 8 deletions

View File

@@ -58,6 +58,7 @@
#include <Gui/Selection.h>
#include <Gui/SelectionObject.h>
#include <Gui/SoFCColorBar.h>
#include <Gui/SoFCColorBarNotifier.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
@@ -232,6 +233,7 @@ ViewProviderFemPostObject::ViewProviderFemPostObject()
m_colorRoot->addChild(m_colorStyle);
m_colorBar = new Gui::SoFCColorBar;
m_colorBar->Attach(this);
Gui::SoFCColorBarNotifier::instance().attach(m_colorBar);
m_colorBar->ref();
// create the vtk algorithms we use for visualisation
@@ -274,6 +276,7 @@ ViewProviderFemPostObject::~ViewProviderFemPostObject()
m_material->unref();
m_matPlainEdges->unref();
m_switchMatEdges->unref();
Gui::SoFCColorBarNotifier::instance().detach(m_colorBar);
m_colorBar->Detach(this);
m_colorBar->unref();
m_colorStyle->unref();