Skip to content

Commit 6062bb5

Browse files
committedMay 16, 2011
Integrate Mac window event code with 'Show composer maps on demand'
1 parent 6de875a commit 6062bb5

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,6 @@ void QgsComposer::changeEvent( QEvent* event )
371371
break;
372372
}
373373
}
374-
375-
void QgsComposer::showEvent( QShowEvent *event )
376-
{
377-
QMainWindow::showEvent( event );
378-
// add to menu if (re)opening window (event not due to unminimize)
379-
if ( !event->spontaneous() )
380-
{
381-
QgisApp::instance()->addWindow( mWindowAction );
382-
}
383-
}
384374
#endif
385375

386376
void QgsComposer::setTitle( const QString& title )
@@ -1137,6 +1127,14 @@ void QgsComposer::showEvent( QShowEvent* event )
11371127
}
11381128
mMapsToRestore.clear();
11391129
}
1130+
1131+
#ifdef Q_WS_MAC
1132+
// add to menu if (re)opening window (event not due to unminimize)
1133+
if ( !event->spontaneous() )
1134+
{
1135+
QgisApp::instance()->addWindow( mWindowAction );
1136+
}
1137+
#endif
11401138
}
11411139

11421140
void QgsComposer::saveWindowState()

‎src/app/composer/qgscomposer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
9797
#ifdef Q_WS_MAC
9898
//! Change event (update window menu on ActivationChange)
9999
virtual void changeEvent( QEvent * );
100-
101-
//! Show event (add window to menu)
102-
virtual void showEvent( QShowEvent * );
103100
#endif
104101

105102
signals:

0 commit comments

Comments
 (0)
Please sign in to comment.