Skip to content

Conversation

@alexpavlov96
Copy link
Contributor

Resolves: (direct link to the issue)

(short description of the changes and the motivation to make the changes)

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Sep 8, 2021

Seems this would fix a pretty frequent request, see https://musescore.org/en/node/313555.
If so maybe change the commit title to start with "Fix #313555: "?

Isn't there any UI to switch this on/off?

{
Segment* current = nullptr;
for (current = measure->first(); current && !current->enabled(); current = current->next()) {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty for loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it chanegs the current segment

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I see that it used the side effect, but that's confusing code, to me at least.

Copy link
Contributor

@igorkorsukov igorkorsukov Sep 8, 2021

Choose a reason for hiding this comment

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

I agree with Jojo, I believe needs rewrite this code

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, that while loop is better

@alexpavlov96
Copy link
Contributor Author

alexpavlov96 commented Sep 8, 2021

Seems this would fix a pretty frequent request, see https://musescore.org/en/node/313555.
If so maybe change the commit title to start with "Fix #313555: "?

Isn't there any UI to switch this on/off?

@Jojo-Schmitz there is no UI. I didn't know about the issue. I tested with setting in layoutoptions.h:

struct LayoutOptions
{
LayoutMode mode = LayoutMode::HORIZONTAL_FIXED;

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Sep 8, 2021

OK, so a UI for this is not part of this PR (yet), but needed.
At least an advanced preference setting.

QSet<int> occupiedMidiChannels; // each entry is port*16+channel, port range: 0-inf, channel: 0-15
unsigned int searchMidiMappingFrom = 0; // makes getting next free MIDI mapping faster

qreal m_widthOfSegmentCell { 3 };
Copy link
Contributor

Choose a reason for hiding this comment

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


qreal Measure::computeFirstSegmentXPosition(Segment* segment)
{
qreal x{ 0 };
Copy link
Contributor

Choose a reason for hiding this comment

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

@alexpavlov96 alexpavlov96 force-pushed the horizontal_fixed_layout branch from f33158d to 2221851 Compare September 9, 2021 09:50
@alexpavlov96
Copy link
Contributor Author

OK, so a UI for this is not part of this PR (yet), but needed.
At least an advanced preference setting.

@Jojo-Schmitz, no UI yet, so I didn't change the name

@igorkorsukov
Copy link
Contributor

We plan to make the UI later

@igorkorsukov igorkorsukov merged commit 392cca9 into musescore:master Sep 9, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 16, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 16, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 16, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 16, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 16, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 17, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 20, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 20, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 20, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 20, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 21, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 21, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 22, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 22, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 24, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 24, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 26, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 26, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 29, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 3, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 3, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Dec 7, 2021
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Dec 7, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
(Very partial) backport of musescore#9068, the rest is too large for too litle
benefit (mainly due to the missing UI) and also requires C++17.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
@alexpavlov96 alexpavlov96 deleted the horizontal_fixed_layout branch June 26, 2023 13:58
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