Commit 96c7f931 authored by Arthur Pichlkostner's avatar Arthur Pichlkostner Committed by Harald Sitter

Fix: user settings for gui not saved after program is closed

Summary:
When the player switches to full screen mode the settings for the visibility of menubar, toolbar and statusbar are set to fixed values and the user settings are saved in backup variables.
These backup values are restored when the player is closed. If the player is not in full screen mode, the backup variable have default values and the user settings are overwritten.

Solution: Restore settings only when the window is in fullscreen mode.

BUG: 376961

Reviewers: sitter

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D15594
parent 65e7e1bd
......@@ -245,11 +245,13 @@ MainWindow::~MainWindow()
void MainWindow::closeEvent (QCloseEvent *event)
{
// Restore the state of these before closing
mainWindow()->setWindowState( Qt::WindowNoState );
statusBar()->setHidden( m_statusbarIsHidden );
toolBar()->setHidden( m_toolbarIsHidden );
menuBar()->setHidden( m_menuBarIsHidden );
// restore the following user ui settings which are changed in full screen mode
if (mainWindow()->isFullScreen()) {
statusBar()->setHidden( m_statusbarIsHidden );
toolBar()->setHidden( m_toolbarIsHidden );
menuBar()->setHidden( m_menuBarIsHidden );
}
KMainWindow::closeEvent( event );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment