Skip to content

Commit

Permalink
respect transparency when setting color per face
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 5, 2019
1 parent ab1f4c4 commit a395c57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mod/Part/Gui/TaskFaceColors.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit a395c57

Please sign in to comment.