src/widgets/colorselectdialog.cpp

changeset 115
ed884a2fb009
parent 94
164f53fb5921
child 139
72098474d362
equal deleted inserted replaced
114:4e03b0e2a29f 115:ed884a2fb009
102 else 102 else
103 { 103 {
104 const ldraw::ColorTable::ColorDefinition& colordef = this->colorTable[this->selectedColor]; 104 const ldraw::ColorTable::ColorDefinition& colordef = this->colorTable[this->selectedColor];
105 this->ui.selectedColorName->setText(colordef.displayName); 105 this->ui.selectedColorName->setText(colordef.displayName);
106 } 106 }
107 this->ui.selectedColorName->setStyleSheet(styleSheetForColor(ldraw::colorFace(this->selectedColor, this->colorTable))); 107 const QColor colorFace = ldraw::colorFace(this->selectedColor, this->colorTable);
108 this->ui.selectedColorName->setStyleSheet(styleSheetForColor(colorFace));
108 this->ui.colorIndex->setValue(this->selectedColor.index); 109 this->ui.colorIndex->setValue(this->selectedColor.index);
109 for (QPushButton* button : this->buttons) 110 for (QPushButton* button : this->buttons)
110 { 111 {
111 ldraw::Color buttonColor = colorFromButton(button); 112 ldraw::Color buttonColor = colorFromButton(button);
112 button->setChecked(buttonColor == this->selectedColor); 113 button->setChecked(buttonColor == this->selectedColor);

mercurial