Gui: change notification between SoFCColorBarBase nodes

This commit is contained in:
wmayer
2022-04-01 19:27:45 +02:00
parent 90c35171ae
commit c50924be03
5 changed files with 24 additions and 15 deletions

View File

@@ -90,8 +90,7 @@ public:
~SoFCColorBarProxyObject() {}
void customEvent(QEvent *)
{
if (bar->customize())
bar->Notify(0);
bar->customize(bar->getActiveBar());
this->deleteLater();
}
@@ -197,14 +196,18 @@ float SoFCColorBar::getMaxValue () const
return this->getActiveBar()->getMaxValue();
}
bool SoFCColorBar::customize()
void SoFCColorBar::triggerChange(SoFCColorBarBase*)
{
Notify(0);
}
void SoFCColorBar::customize(SoFCColorBarBase* child)
{
try {
return this->getActiveBar()->customize();
return child->customize(this);
}
catch (const Base::ValueError& e) {
e.ReportException();
return false;
}
}