@@ -1750,38 +1750,40 @@ void QgisApp::createStatusBar()
1750
1750
statusBar ()->addPermanentWidget ( mScaleEdit , 0 );
1751
1751
connect ( mScaleEdit , SIGNAL ( scaleChanged () ), this , SLOT ( userScale () ) );
1752
1752
1753
- // add a widget to show/set current rotation
1754
- mRotationLabel = new QLabel ( QString (), statusBar () );
1755
- mRotationLabel ->setObjectName ( " mRotationLabel" );
1756
- mRotationLabel ->setFont ( myFont );
1757
- mRotationLabel ->setMinimumWidth ( 10 );
1758
- mRotationLabel ->setMaximumHeight ( 20 );
1759
- mRotationLabel ->setMargin ( 3 );
1760
- mRotationLabel ->setAlignment ( Qt::AlignCenter );
1761
- mRotationLabel ->setFrameStyle ( QFrame::NoFrame );
1762
- mRotationLabel ->setText ( tr ( " Rotation:" ) );
1763
- mRotationLabel ->setToolTip ( tr ( " Current clockwise map rotation in degrees" ) );
1764
- statusBar ()->addPermanentWidget ( mRotationLabel , 0 );
1765
-
1766
- mRotationEdit = new QgsDoubleSpinBox ( statusBar () );
1767
- mRotationEdit ->setObjectName ( " mRotationEdit" );
1768
- mRotationEdit ->setClearValue ( 0.0 );
1769
- mRotationEdit ->setKeyboardTracking ( false );
1770
- mRotationEdit ->setMaximumWidth ( 120 );
1771
- mRotationEdit ->setDecimals ( 1 );
1772
- mRotationEdit ->setMaximumHeight ( 20 );
1773
- mRotationEdit ->setRange ( -180.0 , 180.0 );
1774
- mRotationEdit ->setWrapping ( true );
1775
- mRotationEdit ->setSingleStep ( 5.0 );
1776
- mRotationEdit ->setFont ( myFont );
1777
- mRotationEdit ->setWhatsThis ( tr ( " Shows the current map clockwise rotation "
1778
- " in degrees. It also allows editing to set "
1779
- " the rotation" ) );
1780
- mRotationEdit ->setToolTip ( tr ( " Current clockwise map rotation in degrees" ) );
1781
- statusBar ()->addPermanentWidget ( mRotationEdit , 0 );
1782
- connect ( mRotationEdit , SIGNAL ( valueChanged ( double ) ), this , SLOT ( userRotation () ) );
1783
-
1784
- showRotation ();
1753
+ if ( getenv ( " QGIS_ENABLE_CANVAS_ROTATION" ) ) {
1754
+ // add a widget to show/set current rotation
1755
+ mRotationLabel = new QLabel ( QString (), statusBar () );
1756
+ mRotationLabel ->setObjectName ( " mRotationLabel" );
1757
+ mRotationLabel ->setFont ( myFont );
1758
+ mRotationLabel ->setMinimumWidth ( 10 );
1759
+ mRotationLabel ->setMaximumHeight ( 20 );
1760
+ mRotationLabel ->setMargin ( 3 );
1761
+ mRotationLabel ->setAlignment ( Qt::AlignCenter );
1762
+ mRotationLabel ->setFrameStyle ( QFrame::NoFrame );
1763
+ mRotationLabel ->setText ( tr ( " Rotation:" ) );
1764
+ mRotationLabel ->setToolTip ( tr ( " Current clockwise map rotation in degrees" ) );
1765
+ statusBar ()->addPermanentWidget ( mRotationLabel , 0 );
1766
+
1767
+ mRotationEdit = new QgsDoubleSpinBox ( statusBar () );
1768
+ mRotationEdit ->setObjectName ( " mRotationEdit" );
1769
+ mRotationEdit ->setClearValue ( 0.0 );
1770
+ mRotationEdit ->setKeyboardTracking ( false );
1771
+ mRotationEdit ->setMaximumWidth ( 120 );
1772
+ mRotationEdit ->setDecimals ( 1 );
1773
+ mRotationEdit ->setMaximumHeight ( 20 );
1774
+ mRotationEdit ->setRange ( -180.0 , 180.0 );
1775
+ mRotationEdit ->setWrapping ( true );
1776
+ mRotationEdit ->setSingleStep ( 5.0 );
1777
+ mRotationEdit ->setFont ( myFont );
1778
+ mRotationEdit ->setWhatsThis ( tr ( " Shows the current map clockwise rotation "
1779
+ " in degrees. It also allows editing to set "
1780
+ " the rotation" ) );
1781
+ mRotationEdit ->setToolTip ( tr ( " Current clockwise map rotation in degrees" ) );
1782
+ statusBar ()->addPermanentWidget ( mRotationEdit , 0 );
1783
+ connect ( mRotationEdit , SIGNAL ( valueChanged ( double ) ), this , SLOT ( userRotation () ) );
1784
+
1785
+ showRotation ();
1786
+ }
1785
1787
1786
1788
1787
1789
// render suppression status bar widget
0 commit comments