Skip to content

Commit

Permalink
Setting initial color of QColorDialog
Browse files Browse the repository at this point in the history
This commit fixes issue FreeCAD#7322
  • Loading branch information
xtemp09 authored and chennes committed Apr 27, 2023
1 parent 96b1bcf commit bd66835
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Gui/Widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ void ColorButton::showModeless()
if (DialogOptions::dontUseNativeColorDialog())
dlg->setOptions(QColorDialog::DontUseNativeDialog);
dlg->setOption(QColorDialog::ColorDialogOption::ShowAlphaChannel, d->allowTransparency);
dlg->setCurrentColor(d->old);
connect(dlg, &QColorDialog::rejected, this, &ColorButton::onRejected);
connect(dlg, &QColorDialog::currentColorChanged, this, &ColorButton::onColorChosen);
d->cd = dlg;
Expand Down

0 comments on commit bd66835

Please sign in to comment.