Package: qgis / 2.4.0-1

0001-Disable-preview-modes-under-OSX-due-to-issues-with-Q.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 5ecc9080ec113e422f789bc680f63447af9e7e15 Mon Sep 17 00:00:00 2001
From: Nyall Dawson <nyall.dawson@gmail.com>
Date: Sun, 27 Jul 2014 15:41:25 +1000
Subject: Disable preview modes under OSX due to issues with QGraphicsEffects
 under OSX (refs #10761)
Origin: https://github.com/qgis/QGIS/commit/5ecc9080ec113e422f789bc680f63447af9e7e15
Bug: http://hub.qgis.org/issues/10761


--- a/src/app/composer/qgscomposer.cpp
+++ b/src/app/composer/qgscomposer.cpp
@@ -296,12 +296,16 @@ QgsComposer::QgsComposer( QgisApp *qgis,
   QShortcut* ctrlEquals = new QShortcut( QKeySequence( "Ctrl+=" ), this );
   connect( ctrlEquals, SIGNAL( activated() ), mActionZoomIn, SLOT( trigger() ) );
 
+#ifndef Q_WS_MAC
+  //disabled for OSX - see #10761
+  //also see http://qt-project.org/forums/viewthread/3630 QGraphicsEffects are not well supported on OSX
   QMenu *previewMenu = viewMenu->addMenu( "Preview" );
   previewMenu->addAction( mActionPreviewModeOff );
   previewMenu->addAction( mActionPreviewModeGrayscale );
   previewMenu->addAction( mActionPreviewModeMono );
   previewMenu->addAction( mActionPreviewProtanope );
   previewMenu->addAction( mActionPreviewDeuteranope );
+#endif
 
   viewMenu->addSeparator();
   viewMenu->addAction( mActionZoomIn );
--- a/src/app/qgisapp.cpp
+++ b/src/app/qgisapp.cpp
@@ -1471,6 +1471,14 @@ void QgisApp::createMenus()
     mSettingsMenu->insertSeparator( before );
   }
 
+
+#ifdef Q_WS_MAC
+  //disabled for OSX - see #10761
+  //also see http://qt-project.org/forums/viewthread/3630 QGraphicsEffects are not well supported on OSX
+  mMenuPreviewMode->menuAction()->setVisible( false );
+#endif
+
+
 #ifdef Q_WS_MAC
 
   // keep plugins from hijacking About and Preferences application menus
--- a/src/ui/qgisapp.ui
+++ b/src/ui/qgisapp.ui
@@ -88,7 +88,7 @@
      <addaction name="mActionDecorationNorthArrow"/>
      <addaction name="mActionDecorationCopyright"/>
     </widget>
-    <widget class="QMenu" name="menuPreview_Mode">
+    <widget class="QMenu" name="mMenuPreviewMode">
      <property name="title">
       <string>Preview Mode</string>
      </property>
@@ -115,7 +115,7 @@
     <addaction name="mActionZoomActualSize"/>
     <addaction name="separator"/>
     <addaction name="menuDecorations"/>
-    <addaction name="menuPreview_Mode"/>
+    <addaction name="mMenuPreviewMode"/>
     <addaction name="mActionMapTips"/>
     <addaction name="mActionNewBookmark"/>
     <addaction name="mActionShowBookmarks"/>