mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 13:09:42 +00:00
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
This commit is contained in:
parent
a206f57f75
commit
e47f1ef3e3
2 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue