Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Menu bar for composer also on platforms != mac. Fixes bug 1668
git-svn-id: http://svn.osgeo.org/qgis/trunk@11775 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 8, 2009
1 parent 7092a44 commit 7da03a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -116,7 +116,6 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
mActionAddImage->setCheckable( true );
mActionMoveItemContent->setCheckable( true );

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

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

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

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

menuBar()->addMenu( QgisApp::instance()->helpMenu() );
#endif
#endif


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

mQgis = qgis;
mFirstTime = true;
Expand Down
2 changes: 0 additions & 2 deletions src/app/composer/qgscomposer.h
Expand Up @@ -279,10 +279,8 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! To know which item to show if selection changes
QMap<QgsComposerItem*, QWidget*> mItemWidgetMap;

#ifdef Q_WS_MAC
//! Window menu action to select this window
QAction *mWindowAction;
#endif

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

0 comments on commit 7da03a8

Please sign in to comment.