Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #304333: Using Edit > Preferences causes crash when no score is open #5984

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

mattmcclinch
Copy link
Contributor

Resolves: https://musescore.org/en/node/304333.

It is unnecessary for Timeline::updateTimelineTheme() to call updateView()
and drawSelection() since it calls updateGrid() which already calls both
of these methods. However, Timeline::updateTimelineTheme() does need to set
the background brush for the _rownames object in order to ensure that the
new theme applies to the whole timeline.

@@ -2882,11 +2885,10 @@ const TimelineTheme& Timeline::activeTheme() const

void Timeline::updateTimelineTheme()
{
scene()->setBackgroundBrush(QBrush(activeTheme().backgroundColor));
updateView();
QBrush backgroundBrush = QBrush(activeTheme().backgroundColor);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind making this const QBrush?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Resolves: https://musescore.org/en/node/304333.

It is unnecessary for Timeline::updateTimelineTheme() to call updateView()
and drawSelection() since it calls updateGrid() which already calls both
of these methods. However, Timeline::updateTimelineTheme() does need to set
the background brush for the _rownames object in order to ensure that the
new theme applies to the whole timeline.
@mattmcclinch mattmcclinch force-pushed the 304333-preferences-crash branch from c8023d4 to cd1d693 Compare April 23, 2020 15:04
@anatoly-os anatoly-os merged commit cfa8874 into musescore:master Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants