diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2020-01-19 16:09:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-19 16:09:25 +0100 |
commit | 4ff19c826072167417492277a22b16d767675f26 (patch) | |
tree | e38faffa057bf7556d3ed3ae7f0f35f19f8818cf /3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp | |
parent | b67ba18590f4a4ec5bb3f1062a8b1495e88f14bb (diff) | |
parent | 714769e1b83dd548967a1f6bc614b29abfc22bc1 (diff) | |
download | nextpnr-4ff19c826072167417492277a22b16d767675f26.tar.gz nextpnr-4ff19c826072167417492277a22b16d767675f26.tar.bz2 nextpnr-4ff19c826072167417492277a22b16d767675f26.zip |
Merge pull request #384 from YosysHQ/warning_fixes
Warning fixes
Diffstat (limited to '3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp')
-rw-r--r-- | 3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp b/3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp index a2ef86c9..7cd130f3 100644 --- a/3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp +++ b/3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp @@ -2207,9 +2207,9 @@ void QtColorEditWidget::buttonClicked() { bool ok = false; QRgb oldRgba = m_color.rgba(); - QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this); - if (ok && newRgba != oldRgba) { - setValue(QColor::fromRgba(newRgba)); + QColor newRgba = QColorDialog::getColor(oldRgba, this).rgba(); + if (newRgba.isValid() && newRgba.rgba() != oldRgba) { + setValue(newRgba); emit valueChanged(m_color); } } |