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 #100791 - call fixTicks when Tempotext is being changed #2470

Merged
merged 1 commit into from Apr 1, 2016

Conversation

akhisud
Copy link
Contributor

@akhisud akhisud commented Mar 20, 2016

No description provided.

@lasconic
Copy link
Contributor

I can't reproduce the bug and I don't see why this would fix it. Could you explain?

@akhisud
Copy link
Contributor Author

akhisud commented Mar 21, 2016

I explained here : https://musescore.org/en/node/100791#comment-460731

@MarcSabatella
Copy link
Contributor

See https://musescore.org/en/node/100791#comment-460786 for the specific steps to reproduce the bug. What's weird is I would have sworn we had a bug just like this fixed a year or so ago.

@MarcSabatella
Copy link
Contributor

Hmm, reported almost a year ago, but apparently never fixed: https://musescore.org/en/node/70366

@akhisud
Copy link
Contributor Author

akhisud commented Mar 21, 2016

The same fix fixes this bug too

@@ -190,6 +190,7 @@ void TempoText::textChanged()
}
}
}
score()->fixTicks();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is not needed if the tempo is not actually changed right? So that should move just before score()->setPlaylistDirty();
Also what happens if the tempo is changed via the inspector (without followtext?), the bug will still be here I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved score()->fixTicks(); just before score()->setPlaylistDirty();.
To handle the case where inspector changes tempo text, adding the line:
if(val1!=val2) score->fixTicks();
just after the line:
https://github.com/musescore/MuseScore/blob/master/mscore/inspector/inspectorBase.cpp#L385 solves the problem.
But score->fixTicks(); should execute here, only in the case when 'this' is specifically of type Ms::InspectorTempoText and not just any Ms::InspectorBase. Can I use a dynamic_cast to check for this (like an instanceof check)? Its usually not thought of as good coding practice to use a dynamic_cast, if I am not wrong, but I don't see another way.

Copy link
Contributor

Choose a reason for hiding this comment

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

No. We need a better place.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe here

score()->setTempo(segment(), _tempo);
...
These whole fermata handling need an overhaul...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That fixed it. I see why it should be at that place. I'll push these two changes to the PR.

@Jojo-Schmitz
Copy link
Contributor

could you squash the commits?

Change fix- tempo text and inspector changes

Delete line
@akhisud
Copy link
Contributor Author

akhisud commented Mar 31, 2016

Squashed.

@lasconic lasconic merged commit 24fe175 into musescore:master Apr 1, 2016
@akhisud akhisud deleted the fermata branch April 1, 2016 08:08
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.

None yet

5 participants