Skip to content

Commit

Permalink
Merge pull request #21 from telwertowski/master
Browse files Browse the repository at this point in the history
Integrate Mac window event code with 'Show composer maps on demand'
  • Loading branch information
mhugent committed May 16, 2011
2 parents 6de875a + 6062bb5 commit 72b6cd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
18 changes: 8 additions & 10 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions src/app/composer/qgscomposer.h
Expand Up @@ -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:
Expand Down

0 comments on commit 72b6cd1

Please sign in to comment.