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

278068 newline in new text #4364

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

tobik
Copy link
Contributor

@tobik tobik commented Dec 10, 2018

This pull request fixes the discartion of the first newline in a new text.

In addition to #4359 the EOL marker of the first line is false, if the text has been new inserted and edit mode is still active. In that case also the first line must be set to EOL true.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Dec 10, 2018

This PR should better be based on master, without the content of your other PR #4220

@tobik
Copy link
Contributor Author

tobik commented Dec 10, 2018

Oups - sorry. The breath - commit does not belong to this pull request. Please standby - I will remove it.

@tobik
Copy link
Contributor Author

tobik commented Dec 10, 2018

Of course, you are right. Please standby

@anatoly-os anatoly-os merged commit 6b0ec14 into musescore:master Dec 12, 2018
@tobik tobik deleted the 278068-newline-in-new-text branch December 12, 2018 19:48
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 3, 2021
…reak

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

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 3, 2021
…reak

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

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
vpereverzev pushed a commit that referenced this pull request Feb 3, 2021
…reak

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

When #4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by #4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, #5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 15, 2021
…reak

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

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 15, 2021
…reak

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

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
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

3 participants