JoshuaBonn1 / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
0 stars 0 forks source link

Loses control of height upon changing system text #1

Closed JoshuaBonn1 closed 7 years ago

JoshuaBonn1 commented 7 years ago

Steps: 1) Open timeline. 2) Increase the height of the timeline. 3) Add some form of text to the score. 4) Double click on the text to begin editing the text.

Desired: Editor pops up next to the timeline at the same height as the timeline. Current: Editor shrinks the timeline to a specific height based on the minimum height of the timeline.

JoshuaBonn1 commented 7 years ago

I would assume this to also happen with the drumkit helper thing (I cannot test these things because a commit broke my shortcuts).

JoshuaBonn1 commented 7 years ago

@ericfont I've been having very little luck in fixing this problem... I was able to make it work if you open up the timeline, increase the height, and then start editing some text. However, if the timeline is already open upon load up, it doesn't work. Also, it doesn't shrink the texttools upon undocking the timeline.

For the issue of the timeline already being open, I was thinking of checking if it is open upon showing the texttools, and if it is, then set the sizepolicies to make it fit. I think I found where to do that, in MuseScore::changeState(ScoreState val) where textTools()->hide() and textTools()->show() are.

For the issue of it not shrinking upon undocking, I cannot find a way to know when it has been undocked. I know I can check if it was undocked, but not upon the event of undocking.

JoshuaBonn1 commented 7 years ago

I may have found a solution, I was unaware of topLevelChanged(bool) in qdockwidget meaning if it was floating or not. Attempting to implement it now. there may be a different issue with docking on the top or the bottom, but I'll wait to see. [EDIT] It now works when undocking the timeline. Now, I need to make it work for when they are docked to different positions. [EDIT 2] Things are working mostly now. Almost have everything done on this bug

ericfont commented 7 years ago

So I've tried out this fix, and it "works"

I'm noticing about what you mentioned that this needs to work for drums as well. Here is what happens after I initially had a taller timeline dock height and then entered edit mode on a drum staff:

screenshot at 2017-08-07 22-56-23

The entire dock shortened. Just adding a note.

ericfont commented 7 years ago

Reopen this issue or make another issue for drum edit.

JoshuaBonn1 commented 7 years ago

Whoops, meant to open a new issue for this one.