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();