Skip to content

Commit ec9cda8

Browse files
author
mhugent
committedOct 8, 2009
Menu bar for composer also on platforms != mac. Fixes bug 1668
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11775 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
116116
mActionAddImage->setCheckable( true );
117117
mActionMoveItemContent->setCheckable( true );
118118

119-
#ifdef Q_WS_MAC
120119
QMenu *appMenu = menuBar()->addMenu( tr( "QGIS" ) );
121120
appMenu->addAction( QgisApp::instance()->actionAbout() );
122121
appMenu->addAction( QgisApp::instance()->actionOptions() );
@@ -128,6 +127,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
128127
fileMenu->addSeparator();
129128
fileMenu->addAction( mActionPrint );
130129

130+
#if 0
131131
QMenu *editMenu = menuBar()->addMenu( tr( "Edit" ) );
132132
QAction *undoAction = editMenu->addAction( tr( "&Undo" ), this, SLOT( undo() ), tr( "Ctrl+Z" ) );
133133
undoAction->setEnabled( false );
@@ -140,6 +140,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
140140
pasteAction->setEnabled( false );
141141
QAction *deleteAction = editMenu->addAction( tr( "Delete" ) );
142142
deleteAction->setEnabled( false );
143+
#endif //0
143144

144145
QMenu *viewMenu = menuBar()->addMenu( tr( "View" ) );
145146
viewMenu->addAction( mActionZoomIn );
@@ -164,16 +165,18 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
164165
layoutMenu->addAction( mActionMoveItemsToTop );
165166
layoutMenu->addAction( mActionMoveItemsToBottom );
166167

168+
#ifdef Q_WS_MAC
167169
#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
168170
menuBar()->addMenu( QgisApp::instance()->windowMenu() );
169171

170172
menuBar()->addMenu( QgisApp::instance()->helpMenu() );
171173
#endif
174+
#endif
175+
172176

173177
// Create action to select this window and add it to Window menu
174178
mWindowAction = new QAction( windowTitle(), this );
175179
connect( mWindowAction, SIGNAL( triggered() ), this, SLOT( activate() ) );
176-
#endif
177180

178181
mQgis = qgis;
179182
mFirstTime = true;

‎src/app/composer/qgscomposer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,8 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
279279
//! To know which item to show if selection changes
280280
QMap<QgsComposerItem*, QWidget*> mItemWidgetMap;
281281

282-
#ifdef Q_WS_MAC
283282
//! Window menu action to select this window
284283
QAction *mWindowAction;
285-
#endif
286284

287285
/**False if first paint already happened (used to create cache of composer maps for screen resolution after reading from project files)*/
288286
bool mFirstPaint;

0 commit comments

Comments
 (0)
Please sign in to comment.