Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tbertels
Copy link
Member

@tbertels tbertels commented Apr 17, 2025

  • Don't uncheck actionViewHidePlaylist if MainWindow is closing
    Otherwise, the playlist is always hidden on start.
    The PlaylistWindow is automatically being closed with the MainWindow.
    Because of this, PlaylistWindow::toggleViewAction is getting called and calls MainWindow::setPlaylistVisibleState.
    There, actionViewHidePlaylist gets unchecked.
    And since ba8d01c, we save settings after (instead of before) the playlist has been automatically closed.
    This means that actionViewHidePlaylist is already unchecked when we save its state.
    By not unchecking it when the window is closing, we prevent that.
    Note: 5c778bf doesn't have any role in this regression.
    Note 2: MainWindow::setPlaylistVisibleState seems to get called twice at the same time when the auto zoom is enabled. That's probably why this bug wasn't reproduceable with auto zoom enabled.
    Fixes Playlist window gets hidden on start if auto zoom is disabled #392.
  • Add logging and simplify MainWindow::on_actionViewHidePlaylist_toggled

Otherwise, the playlist is always hidden on start.
The PlaylistWindow is automatically being closed with the MainWindow.
Because of this, PlaylistWindow::toggleViewAction is getting called and
calls MainWindow::setPlaylistVisibleState.
There, actionViewHidePlaylist gets unchecked.
And since ba8d01c, we save settings
after (instead of before) the playlist has been automatically closed.
This means that actionViewHidePlaylist is already unchecked when we
save its state.
By not unchecking it when the window is closing, we prevent that.
Note: 5c778bf doesn't have any role
in this regression.
Note 2: MainWindow::setPlaylistVisibleState seems to get called twice at
the same time when the auto zoom is enabled. That's probably why this
bug wasn't reproduceable with auto zoom enabled.

Fixes mpc-qt#392.
@cmdrkotori cmdrkotori merged commit 3ded341 into mpc-qt:master Apr 18, 2025
11 of 12 checks passed
@tbertels tbertels deleted the playlist_hidden_on_start branch April 20, 2025 07:30
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.

Playlist window gets hidden on start if auto zoom is disabled

2 participants