Skip to content

Commit

Permalink
fix #308217 fixed palette configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Jul 24, 2020
1 parent 5cdc00d commit 80c41d3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mu4/scenes/palette/internal/paletteconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ bool PaletteConfiguration::isSinglePalette() const

QColor PaletteConfiguration::foregroundColor() const
{
//! NOTE Notation configuration may not exist when building in MU3 mode.
//! Because there is no `mu::domain::notation` module in this mode.
//! For this case, let's add a workaround
if (!notationConfiguration()) {
static const Settings::Key FOREGROUND_COLOR("notation", "ui/canvas/foreground/color");
static const Settings::Key FOREGROUND_USE_USER_COLOR("notation", "ui/canvas/foreground/useColor");

if (settings()->value(PALETTE_USE_USER_FG_COLOR).toBool()) {
if (settings()->value(FOREGROUND_USE_USER_COLOR).toBool()) {
return settings()->value(FOREGROUND_COLOR).toQColor();
}
}
return QColor("#f9f9f9"); // default
}

if (settings()->value(PALETTE_USE_USER_FG_COLOR).toBool()) {
return notationConfiguration()->foregroundColor();
}
Expand Down

0 comments on commit 80c41d3

Please sign in to comment.