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 · 6 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 · 6 comments · Fixed by #8589 · May be fixed by #22135
Labels
P3 Priority: Low

Comments

@vshalkevich
Copy link

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 go 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
@vshalkevich vshalkevich added this to To do in [MU4 - SCORE_VIEW] via automation 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
[MU4 - SCORE_VIEW] automation moved this from To do to Done Jul 13, 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
[MU4 - SCORE_VIEW] automation moved this from Done to In progress Mar 29, 2024
@DmitryArefiev DmitryArefiev added P3 Priority: Low and removed P2 Priority: Medium labels Mar 29, 2024
@DmitryArefiev DmitryArefiev added this to To do in 4.x LONGLIST via automation 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Low
Projects
4.x LONGLIST
  
To do
[MU4 - SCORE_VIEW]
  
In progress
4 participants