Fix incorrect backcolorPick button state after cancellation

This commit is contained in:
lizj
2021-05-10 14:18:19 +01:00
committed by Baldur Karlsson
parent 633170eb7e
commit 5fde0ad90d
+3
View File
@@ -3704,7 +3704,10 @@ void TextureViewer::on_backcolorPick_clicked()
QColor col = QColorDialog::getColor(Qt::black, this, tr("Choose background colour"));
if(!col.isValid())
{
ui->backcolorPick->setChecked(!ui->checkerBack->isChecked());
return;
}
col = col.toRgb();
m_TexDisplay.backgroundColor = FloatVector(col.redF(), col.greenF(), col.blueF(), 1.0f);