diff -r 4e03b0e2a29f -r ed884a2fb009 src/widgets/colorselectdialog.cpp --- a/src/widgets/colorselectdialog.cpp Tue Jul 27 09:56:06 2021 +0300 +++ b/src/widgets/colorselectdialog.cpp Tue Jul 27 11:11:32 2021 +0300 @@ -104,7 +104,8 @@ const ldraw::ColorTable::ColorDefinition& colordef = this->colorTable[this->selectedColor]; this->ui.selectedColorName->setText(colordef.displayName); } - this->ui.selectedColorName->setStyleSheet(styleSheetForColor(ldraw::colorFace(this->selectedColor, this->colorTable))); + const QColor colorFace = ldraw::colorFace(this->selectedColor, this->colorTable); + this->ui.selectedColorName->setStyleSheet(styleSheetForColor(colorFace)); this->ui.colorIndex->setValue(this->selectedColor.index); for (QPushButton* button : this->buttons) {