From e8804c18f6dbe062545cda032c2c2145384dec1d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 18 Dec 2008 22:08:39 +0000 Subject: [PATCH] Update m_showMenuBarAction on the proper time BUG: 178020 svn path=/trunk/KDE/kdegraphics/okular/; revision=898742 --- shell/shell.cpp | 8 +++++++- shell/shell.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/shell/shell.cpp b/shell/shell.cpp index 18e38020b..dea716cbb 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -87,7 +87,6 @@ void Shell::init() createGUI(m_part); m_showToolBarAction = static_cast(toolBarMenuAction()); m_doc = qobject_cast(m_part); - m_showMenuBarAction->setChecked( menuBar()->isVisible() ); } connect( this, SIGNAL( restoreDocument(const KConfigGroup&) ),m_part, SLOT( restoreDocument(const KConfigGroup&))); @@ -271,6 +270,13 @@ void Shell::setFullScreen( bool useFullScreen ) setWindowState( windowState() & ~Qt::WindowFullScreen ); // reset } +void Shell::showEvent(QShowEvent *e) +{ + m_showMenuBarAction->setChecked( menuBar()->isVisible() ); + + KParts::MainWindow::showEvent(e); +} + void Shell::slotUpdateFullScreen() { if(m_fullScreenAction->isChecked()) diff --git a/shell/shell.h b/shell/shell.h index ed6238db9..8afb03d78 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -67,6 +67,8 @@ protected: void writeSettings(); void setFullScreen( bool ); + void showEvent(QShowEvent *event); + private slots: void fileOpen();