diff --git a/src/Gui/PrefWidgets.cpp b/src/Gui/PrefWidgets.cpp index 35e6fda65b..0b573116c7 100644 --- a/src/Gui/PrefWidgets.cpp +++ b/src/Gui/PrefWidgets.cpp @@ -547,8 +547,7 @@ PrefColorButton::~PrefColorButton() void PrefColorButton::restorePreferences() { - if (getWindowParameter().isNull()) - { + if (getWindowParameter().isNull()) { failedToRestore(objectName()); return; } @@ -559,11 +558,11 @@ void PrefColorButton::restorePreferences() unsigned int icol = App::Color::asPackedRGBA(m_Default); unsigned long lcol = static_cast(icol); - lcol = getWindowParameter()->GetUnsigned( entryName(), lcol ); + lcol = getWindowParameter()->GetUnsigned(entryName(), lcol); icol = static_cast(lcol); - QColor value = App::Color::fromPackedRGB(icol); + QColor value = App::Color::fromPackedRGBA(icol); if (!this->allowTransparency()) - value.setAlpha(0xff); + value.setAlpha(0xff); setColor(value); }