Fix some color picker regressions

Don't assign invalid color returned when the color picker is closed by Cancel as the new color
Restore "picking finished" signal to make value saving work again
pull/541/head
Capostrophic 6 years ago
parent a206f57f75
commit e47f1ef3e3

@ -82,6 +82,7 @@ void CSVWidget::ColorEditor::setColor(const int colorInt)
void CSVWidget::ColorEditor::showPicker()
{
mColorPicker->showPicker(calculatePopupPosition(), mColor);
emit pickingFinished();
}
void CSVWidget::ColorEditor::pickerColorChanged(const QColor &color)

@ -39,7 +39,8 @@ void CSVWidget::ColorPickerPopup::showPicker(const QPoint &position, const QColo
// Calling getColor() creates a blocking dialog that will continue execution once the user chooses OK or Cancel
QColor color = mColorPicker->getColor(initialColor);
mColorPicker->setCurrentColor(color);
if (color.isValid())
mColorPicker->setCurrentColor(color);
}
void CSVWidget::ColorPickerPopup::mousePressEvent(QMouseEvent *event)

Loading…
Cancel
Save