Fixed bug relate to pressing cancel in the color picker.

monitor
Elliott Liggett 2022-08-21 23:50:02 -07:00
rodzic 1388c756c4
commit d11ae30b1a
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -236,7 +236,7 @@ void meter::paintEvent(QPaintEvent *)
void meter::drawLabel(QPainter *qp)
{
qp->setPen(lowLineColor);
qp->setPen(lowTextColor);
qp->drawText(0,scaleTextYstart, label );
}

Wyświetl plik

@ -6275,7 +6275,10 @@ QColor wfmain::getColorFromPicker(QColor initialColor)
options.setFlag(QColorDialog::ShowAlphaChannel, true);
options.setFlag(QColorDialog::DontUseNativeDialog, true);
QColor selColor = QColorDialog::getColor(initialColor, this, "Select Color", options);
return selColor;
if(selColor.isValid())
return selColor;
else
return initialColor;
}
void wfmain::getSetColor(QLedLabel *led, QLabel *label)