Fix deprecated QColorDialog::getRgba.
--HG-- branch : develop
This commit is contained in:
parent
fc38ce6df1
commit
54e2025439
|
@ -96,12 +96,10 @@ QString VPE::VColorPropertyEditor::GetColorString(const QColor& color)
|
||||||
|
|
||||||
void VPE::VColorPropertyEditor::onToolButtonClicked()
|
void VPE::VColorPropertyEditor::onToolButtonClicked()
|
||||||
{
|
{
|
||||||
bool ok = false;
|
const QColor newColor = QColorDialog::getColor(Color, this, QString(), QColorDialog::ShowAlphaChannel);
|
||||||
QRgb oldRgba = Color.rgba();
|
if (newColor.isValid() && newColor != Color)
|
||||||
QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this);
|
|
||||||
if (ok && newRgba != oldRgba)
|
|
||||||
{
|
{
|
||||||
SetColor(QColor::fromRgba(newRgba));
|
SetColor(newColor);
|
||||||
emit dataChangedByUser(Color, this);
|
emit dataChangedByUser(Color, this);
|
||||||
UserChangeEvent *event = new UserChangeEvent();
|
UserChangeEvent *event = new UserChangeEvent();
|
||||||
QCoreApplication::postEvent ( this, event );
|
QCoreApplication::postEvent ( this, event );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user