From 62dbfc52904f377637aa018e1045cba06bce4dd3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 27 Jul 2022 17:03:47 +0200 Subject: [PATCH] Part: if boolean/compound object has set transparency then override the values of the input shape --- src/Mod/Part/Gui/ViewProviderBoolean.cpp | 18 ++++++++++++++++++ src/Mod/Part/Gui/ViewProviderCompound.cpp | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.cpp b/src/Mod/Part/Gui/ViewProviderBoolean.cpp index 86c591056b..01f82e185d 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/Part/Gui/ViewProviderBoolean.cpp @@ -130,6 +130,12 @@ void ViewProviderBoolean::updateData(const App::Property* prop) applyColor(hist[1], colTool, colBool); } + // If the view provider has set a transparency then override the values + // of the input shapes + if (Transparency.getValue() > 0) { + applyTransparency(Transparency.getValue(), colBool); + } + this->DiffuseColor.setValues(colBool); } } @@ -218,6 +224,12 @@ void ViewProviderMultiFuse::updateData(const App::Property* prop) } } + // If the view provider has set a transparency then override the values + // of the input shapes + if (Transparency.getValue() > 0) { + applyTransparency(Transparency.getValue(), colBool); + } + this->DiffuseColor.setValues(colBool); } else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { @@ -349,6 +361,12 @@ void ViewProviderMultiCommon::updateData(const App::Property* prop) } } + // If the view provider has set a transparency then override the values + // of the input shapes + if (Transparency.getValue() > 0) { + applyTransparency(Transparency.getValue(), colBool); + } + this->DiffuseColor.setValues(colBool); } else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) { diff --git a/src/Mod/Part/Gui/ViewProviderCompound.cpp b/src/Mod/Part/Gui/ViewProviderCompound.cpp index f98a5ba53a..a719f767e9 100644 --- a/src/Mod/Part/Gui/ViewProviderCompound.cpp +++ b/src/Mod/Part/Gui/ViewProviderCompound.cpp @@ -125,6 +125,12 @@ void ViewProviderCompound::updateData(const App::Property* prop) } } + // If the view provider has set a transparency then override the values + // of the input shapes + if (Transparency.getValue() > 0) { + applyTransparency(Transparency.getValue(), compCol); + } + this->DiffuseColor.setValues(compCol); } else if (prop->getTypeId().isDerivedFrom(App::PropertyLinkList::getClassTypeId())) {