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 #19374 #153

Merged
merged 2 commits into from
Jan 21, 2013
Merged

Fix #19374 #153

merged 2 commits into from
Jan 21, 2013

Conversation

mgavioli
Copy link
Contributor

Fix #19374

Wide (two-digit) numbers in TAB collide; fixed

See: http://musescore.org/en/node/19374

//---------------------------------------------------------

qreal Note::headWidth() const
qreal Note::headWidth(StaffTypeTablature* tab) const
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably a naive question, but is there no way to get the StaffType from the note instead of passing it and then detect if the stafftype is a tablature and do things accordingly? The signature of the method just feel weird from the outside.

@mgavioli
Copy link
Contributor Author

This was my original idea, but sometime the 'real' fret mark width is needed and sometime the 'abstract' (= as pitched) width is needed for alignment or centering purposes. If you look, you see that the method is called sometime with and sometime without the parameter.

It would be possible to pass a boolean (actual vs. abstract) but I indulged in a bit of optimization, as the StaffTypeTablature* is already known in all the cases when it is needed, rather than climb the whole ladder note -> track -> staff -> stafftype for each note.

It would also be possible to add entirely new methods for tabs: Note::tabHeadWidth(StaffTypeTablature_) and Note::tabheadHeight(StaffTypeTablature_); but I would pass the parameter anyway.

Wide (two-digit) numbers in TAB collide; fixed
…TAB's from generic Note::headWidth() and Note::headHeight()
@wschweer wschweer merged commit 4ef467b into musescore:master Jan 21, 2013
heuchi pushed a commit to heuchi/MuseScore that referenced this pull request Nov 13, 2013
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.

3 participants