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
fix #287528, fix #283258 & fix #289773: panels not dockable after undock & close #5086
Conversation
Is this pull request complete and ready for review? |
For reference, here are the three issues which are meant to be fixed by this pull request: |
Yes. Complete and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this solution looks good to me, as far as I understand it shouldn't cause any unwanted side effects as it was the case for #5011. I left some comments pointing to code style issues, but once they are corrected I believe this PR should be good to merge.
mscore/mixer.cpp
Outdated
@@ -200,6 +200,10 @@ void Mixer::masterVolumeChanged(double decibels) | |||
|
|||
void Mixer::on_partOnlyCheckBox_toggled(bool checked) | |||
{ | |||
|
|||
if (!_activeScore) // cope with case of no score being present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the following if
statements can probably be combined:
if (!_activeScore || !_activeScore->excerpt()
return;
mscore/musescore.cpp
Outdated
//--------------------------------------------------------- | ||
|
||
void MuseScore::reDisplayDockWidget(QDockWidget* widget, bool visible) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation: we use 6-space indent for these braces (see other functions definitions)
mscore/musescore.cpp
Outdated
// Ensure the widget is re-dockable if it has been closed and re-opened when un-docked | ||
widget->setFloating(false); | ||
widget->setFloating(true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation: this brace should be indented one level (6 spaces) more (see the Handbook).
mscore/musescore.cpp
Outdated
@@ -4424,6 +4439,10 @@ void MuseScore::readSettings() | |||
|
|||
MuseScore::restoreGeometry(this); | |||
|
|||
// grab the visible state before the beginGroup | |||
// this awkwardness to ensure state saved before code changes should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a brief description of which code changes are mentioned in this comment? It will be possible to find this out via git blame
but it will be even better if one could understand this comment without searching through the changes history.
mscore/musescore.cpp
Outdated
void MuseScore::reDisplayDockWidget(QDockWidget* widget, bool visible) | ||
{ | ||
if (widget->isFloating() && !widget->isVisible()) { | ||
// Ensure the widget is re-dockable if it has been closed and re-opened when un-docked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also could you please add a reference to QTBUG-69922 (something short, like see QTBUG-69922
, would be enough)? Even though this is a really good workaround it is still a workaround, and it is better not to keep it in the code if that issue gets fixed (and ensure that we keep it while this Qt issue is still present).
0a2f962
to
28ad946
Compare
Thanks for review. Requested changes made and pushed. |
mscore/mixer.cpp
Outdated
//--------------------------------------------------------- | ||
|
||
void Mixer::hideEvent(QHideEvent* e) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 space indent is needed too, I seem to have missed that in my last review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed that too. Fixed and pushed.
28ad946
to
be28791
Compare
getting super picky: typo in commit and PR title, "afer" vs "after" |
be28791
to
e010c78
Compare
…ock & close 1) Adds a function that tests if widget is both not-shown (!isVisible) AND in the floating state. If so, it cycles the floating state through off and on again to ensure widget is re-dockable. This is a workaround for QT-69922. The !isVisible() test avoids side effect of dock being resized, e.g. made wider, even when the widget won't be landing on it (#289773). Function used to the fix issue for: - Play Panel - Palettes - Inspector - Selection Filter - Piano Keyboard (when dockable, only dockable in footer) - Time Line (when dockable, only dockable in footer) - Score Comparison Tool - Mixer 2) Addresses some issues with the mixer (#283258) being converted from an independent window to a dock widget: - add code to ensure the show/hide menu is in sync with the mixer being shown - removed inappropriate widget configuration on setup
e010c78
to
86a3476
Compare
Thanks. Have fixed typo and changed the fix's to the appropriate format. |
in the floating state. If so, it cycles the floating state through off
and on again to ensure widget is re-dockable. The !isVisible() test
avoids side effect of dock being resized, e.g. made wider, even when
the widget won't be landing on it (#289773). Function used to the fix
issue for:
an independent window to a dock widget:
shown