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

[MU4 Issue] Instruments are drawn outside the score if added a lot of instruments #7819

Open
vshalkevich opened this issue Mar 29, 2021 · 11 comments · Fixed by #8589 · May be fixed by #22135
Open

[MU4 Issue] Instruments are drawn outside the score if added a lot of instruments #7819

vshalkevich opened this issue Mar 29, 2021 · 11 comments · Fixed by #8589 · May be fixed by #22135
Labels
P3 Priority: Low regression MS4 Regression on a prior release

Comments

@vshalkevich
Copy link

vshalkevich commented Mar 29, 2021

Describe the bug
Instruments go outside the score if added a lot of instruments on the Score Wizard

To Reproduce
Steps to reproduce the behavior:

  1. Start creating a new score
  2. Add a lot of instruments (about 10-15)
  3. Click Done and observe created score view.

Expected behavior
Instruments should not be drawn outside the score if a lot of instruments added to the Score Wizard

Screenshots
2021-03-30 01_56_30-Window

Desktop (please complete the following information):
Windows 10

Additional context
Add any other context about the problem here.

@vshalkevich vshalkevich added the P2 Priority: Medium label Mar 29, 2021
@wizofaus
Copy link
Contributor

Just for reference MU3 does the same except that it doesn't draw the staves onto the background (they're just not shown at all).
Wondering if it wouldn't be better to automatically adjust the scaling in the Page Settings to ensure all the staves always fit? But it shouldn't be too hard to prevent drawing onto the background at least.

@wizofaus
Copy link
Contributor

Tried fixing this using QPainter setClipRegion (or setClipRect) while painting each page but no joy, not sure why it's not working. But MU3 does it by painting the background last using a clip region that's the full canvas area with the area needed for each page removed. To do that in MU4 would really require moving the background paint to the end of Notation::paint (it's currently in NotationPaintView::paint).
But would definitely be nicer if setClipRegion just worked as expected while painting each page.

wizofaus added a commit to wizofaus/MuseScore that referenced this issue Jul 10, 2021
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Jul 10, 2021
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Jul 12, 2021
@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Instruments goes outside the score if added a lot of instruments on the Score Wizard [MU4 Issue] Instruments go outside the score if added a lot of instruments on the Score Wizard Mar 29, 2024
@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Instruments go outside the score if added a lot of instruments on the Score Wizard [MU4 Issue] Instruments render outside the score if added a lot of instruments Mar 29, 2024
@DmitryArefiev DmitryArefiev reopened this Mar 29, 2024
@DmitryArefiev DmitryArefiev added P3 Priority: Low and removed P2 Priority: Medium labels Mar 29, 2024
@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented Mar 29, 2024

Happens again. Was broken in 4.1

bandicam.2024-03-29.14-15-04-248.mp4

@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Instruments render outside the score if added a lot of instruments [MU4 Issue] Instruments are drown outside the score if added a lot of instruments Mar 29, 2024
@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Instruments are drown outside the score if added a lot of instruments [MU4 Issue] Instruments are drawn outside the score if added a lot of instruments Mar 29, 2024
@wizofaus
Copy link
Contributor

If I can get my dev environment working I'm happy to refix this

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Mar 29, 2024

Seems from your old fix this here got lost: https://github.com/musescore/MuseScore/pull/8589/files#diff-b01b000c5ec45fd216a7232e61fffb6d5b2bdeefad8cbe917df441812dfae030, the entire file src/notation/internal/notation.cpp

@wizofaus
Copy link
Contributor

wizofaus commented Apr 1, 2024

The code's all still there, just that it's been moved to paint.cpp now. Looking into it.

wizofaus added a commit to wizofaus/MuseScore that referenced this issue Apr 1, 2024
@wizofaus wizofaus linked a pull request Apr 1, 2024 that will close this issue
8 tasks
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Apr 2, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Apr 2, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Apr 2, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
Fix musescore#7819 - adjustment to previous page-clipping fix
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 16, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 17, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue May 22, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Jun 10, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Jun 10, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Sep 1, 2024
wizofaus pushed a commit to wizofaus/MuseScore that referenced this issue Sep 23, 2024
wizofaus added a commit to wizofaus/MuseScore that referenced this issue Sep 23, 2024
@wizofaus
Copy link
Contributor

@vshalkevich Can you confirm what you believe the expected behaviour is here - that the score should resize itself so the instruments fit? Or that the system is cropped to fit on the page, even though staves will be subsequently invisible?

wizofaus added a commit to wizofaus/MuseScore that referenced this issue Sep 25, 2024
@DmitryArefiev
Copy link
Contributor

@wizofaus For this particular bug the expected result is the instruments outside score page should not be drawn (rendered)

@DmitryArefiev
Copy link
Contributor

How it was in 4.0.0-4.0.2

@DmitryArefiev DmitryArefiev added the regression MS4 Regression on a prior release label Sep 26, 2024
@cbjeukendrup
Copy link
Contributor

@DmitryArefiev But as discussed at the bottom of #22135, we realised that that is actually not desirable (see also the discussion on Slack)

@wizofaus
Copy link
Contributor

V3.6 was the same as V4.0 FWIW.
The current fix is to only crop in publish mode.
In regular score view items that extend off the right of a page and on to the subsequent page are effectively cropped (because the background for that subsequent page is drawn later), but nothing else is. It's not what I would personally prefer but I can see the argument for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Low regression MS4 Regression on a prior release
Projects
Status: Already in progress
5 participants