Skip to content
Permalink
Browse files

Integrate Mac window event code with 'Show composer maps on demand'

  • Loading branch information
telwertowski committed May 16, 2011
1 parent 6de875a commit 6062bb587a2cdd65962bc3ef63f9c3391f2cd1ed
Showing with 8 additions and 13 deletions.
  1. +8 −10 src/app/composer/qgscomposer.cpp
  2. +0 −3 src/app/composer/qgscomposer.h
@@ -371,16 +371,6 @@ void QgsComposer::changeEvent( QEvent* event )
break;
}
}

void QgsComposer::showEvent( QShowEvent *event )
{
QMainWindow::showEvent( event );
// add to menu if (re)opening window (event not due to unminimize)
if ( !event->spontaneous() )
{
QgisApp::instance()->addWindow( mWindowAction );
}
}
#endif

void QgsComposer::setTitle( const QString& title )
@@ -1137,6 +1127,14 @@ void QgsComposer::showEvent( QShowEvent* event )
}
mMapsToRestore.clear();
}

#ifdef Q_WS_MAC
// add to menu if (re)opening window (event not due to unminimize)
if ( !event->spontaneous() )
{
QgisApp::instance()->addWindow( mWindowAction );
}
#endif
}

void QgsComposer::saveWindowState()
@@ -97,9 +97,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
#ifdef Q_WS_MAC
//! Change event (update window menu on ActivationChange)
virtual void changeEvent( QEvent * );

//! Show event (add window to menu)
virtual void showEvent( QShowEvent * );
#endif

signals:

0 comments on commit 6062bb5

Please sign in to comment.
You can’t perform that action at this time.