Skip to content
Permalink
Browse files

respect transparency when setting color per face

  • Loading branch information...
wwmayer committed Jan 5, 2019
1 parent ab1f4c4 commit a395c570f86b0e3ab21b6368bfa2b2c2aa75f165
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Mod/Part/Gui/TaskFaceColors.cpp
@@ -332,9 +332,10 @@ void FaceColors::on_defaultButton_clicked()
void FaceColors::on_colorButton_changed()
{
if (!d->index.isEmpty()) {
float alpha = static_cast<float>(d->vp->Transparency.getValue())/100;
QColor c = d->ui->colorButton->color();
for (QSet<int>::iterator it = d->index.begin(); it != d->index.end(); ++it) {
d->perface[*it].set(c.redF(), c.greenF(), c.blueF());
d->perface[*it].set(c.redF(), c.greenF(), c.blueF(), alpha);
}
d->vp->DiffuseColor.setValues(d->perface);
}

0 comments on commit a395c57

Please sign in to comment.
You can’t perform that action at this time.