Skip to content

Commit 20c07a5

Browse files
committed
Remove support for disabling OTF reprojection
Because - OTF reprojection is mature and stable - Should be no cost when not required - transforms are shortcut when not required - Reduces code complexity - Canvas OTF support was being incorrectly used as a flag for whether measurements should be made in ellipsoidal mode. Instead the project's ellipsoid setting should be checked for this. - Should simplify behavior for new users
1 parent 809d30f commit 20c07a5

File tree

68 files changed

+398
-873
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+398
-873
lines changed

doc/api_break.dox

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,12 @@ QgsLayerTreeNode {#qgis_api_break_3_0_QgsLayerTreeNode}
12571257
- readXml() does not resolve layers from the layer IDs anymore. Call resolveReferences() or use readXml() override with QgsProject as the second argument.
12581258

12591259

1260+
QgsLayerTreeMapCanvasBridge {#qgis_api_break_3_0_QgsLayerTreeMapCanvasBridge}
1261+
-----------------
1262+
1263+
- setAutoEnableCrsTransform() and autoEnableCrsTransform() were removed. CRS transformation is now always enabled.
1264+
1265+
12601266
QgsLayerTreeModel {#qgis_api_break_3_0_QgsLayerTreeMode}
12611267
-----------------
12621268

@@ -1315,6 +1321,7 @@ QgsMapCanvas {#qgis_api_break_3_0_QgsMapCanvas}
13151321
- setProgress() signal has been removed. It was not emitted since 2.0.
13161322
- enableOverviewMode() and updateOverview() have been removed. Map canvas does not keep pointer to overview canvas anymore. Use QgsLayerTreeMapCanvasBridge::setOverviewCanvas() to set up updates of overview canvas together with main canvas.
13171323
- the duplicate mapToolSet signal with a single QgsMapTool argument has been removed. Use the signal with arguments for new and old map tool instead.
1324+
- setCrsTransformEnabled(), hasCrsTransformEnabled(), hasCrsTransformEnabledChanged() were removed. CRS transformation is now always enabled.
13181325

13191326
QgsMapCanvasItem {#qgis_api_break_3_0_QgsMapCanvasItem}
13201327
----------------
@@ -1354,6 +1361,7 @@ QgsMapOverviewCanvas {#qgis_api_break_3_0_QgsMapOverviewCanvas}
13541361

13551362
- layerSet() and setLayerSet() have been replaced by layers() and setLayers() which work with list of layers instead of layer IDs
13561363
- destinationSrsChanged() was renamed to destinationCrsChanged()
1364+
- hasCrsTransformEnabled() was removed. CRS transformation is now always enabled.
13571365

13581366

13591367
QgsMapRenderer {#qgis_api_break_3_0_QgsMapRenderer}
@@ -1421,6 +1429,7 @@ QgsMapSettings {#qgis_api_break_3_0_QgsMapSettings}
14211429
be returned instead of a null pointer if no transformation is required.
14221430
- destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
14231431
plugins calling this method will need to be updated.
1432+
- setCrsTransformEnabled() and hasCrsTransformEnabled() were removed. CRS transformation is now always enabled.
14241433

14251434

14261435
QgsMarkerSymbolLayer {#qgis_api_break_3_0_QgsMarkerSymbolLayer}
@@ -1896,6 +1905,12 @@ QgsTolerance {#qgis_api_break_3_0_QgsTolerance}
18961905
- The MapUnits UnitType was removed. Use LayerUnits or ProjectUnits instead.
18971906

18981907

1908+
QgsTracer {#qgis_api_break_3_0_QgsTracer}
1909+
---------
1910+
1911+
- hasCrsTransformEnabled() and setCrsTransformEnabled() were removed. CRS transformation is now always enabled when required.
1912+
1913+
18991914
QgsTreeWidgetItem {#qgis_api_break_3_0_QgsTreeWidgetItem}
19001915
-----------------
19011916

python/core/qgsmapsettings.sip

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ class QgsMapSettings
8383
*/
8484
void setCustomRenderFlags( const QString& customRenderFlags );
8585

86-
//! sets whether to use projections for this layer set
87-
void setCrsTransformEnabled( bool enabled );
88-
//! returns true if projections are enabled for this layer set
89-
bool hasCrsTransformEnabled() const;
90-
9186
//! sets destination coordinate reference system
9287
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
9388
//! returns CRS of destination coordinate reference system

python/core/qgstracer.sip

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ class QgsTracer : QObject
2020
//! Set layers used for tracing
2121
void setLayers( const QList<QgsVectorLayer*>& layers );
2222

23-
//! Return true if reprojection to destination CRS is enabled
24-
bool hasCrsTransformEnabled() const;
25-
//! Set whether to do reprojection to destination CRS
26-
void setCrsTransformEnabled( bool enabled );
27-
2823
//! Get CRS used for tracing
2924
QgsCoordinateReferenceSystem destinationCrs() const;
3025
//! Set CRS used for tracing

python/gui/layertree/qgslayertreemapcanvasbridge.sip

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ class QgsLayerTreeMapCanvasBridge : QObject
4545
void setAutoSetupOnFirstLayer( bool enabled );
4646
bool autoSetupOnFirstLayer() const;
4747

48-
//! if enabled, will automatically turn on on-the-fly reprojection of layers if a layer
49-
//! with different source CRS is added
50-
void setAutoEnableCrsTransform( bool enabled );
51-
bool autoEnableCrsTransform() const;
52-
5348
public slots:
5449
void setHasCustomLayerOrder( bool state );
5550
void setCustomLayerOrder( const QStringList& order );

python/gui/qgsmapcanvas.sip

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class QgsMapCanvas : QGraphicsView
3636
//! @note added in 2.4
3737
const QgsMapSettings& mapSettings() const /KeepReference/;
3838

39-
//! sets whether to use projections for this layer set
40-
//! @note added in 2.4
41-
void setCrsTransformEnabled( bool enabled );
42-
4339
//! sets destination coordinate reference system
4440
//! @note added in 2.4
4541
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
@@ -360,9 +356,6 @@ class QgsMapCanvas : QGraphicsView
360356
//! State of render suppression flag
361357
bool renderFlag();
362358

363-
//! A simple helper method to find out if on the fly projections are enabled or not
364-
bool hasCrsTransformEnabled();
365-
366359
//! stop rendering (if there is any right now)
367360
//! @note added in 2.4
368361
void stopRendering();
@@ -454,10 +447,6 @@ class QgsMapCanvas : QGraphicsView
454447
//! Emitted when zoom next status changed
455448
void zoomNextStatusChanged( bool );
456449

457-
//! Emitted when on-the-fly projection has been turned on/off
458-
//! @note added in 2.4
459-
void hasCrsTransformEnabledChanged( bool flag );
460-
461450
//! Emitted when map CRS has changed
462451
//! @note added in 2.4
463452
void destinationCrsChanged();

python/gui/qgsmapoverviewcanvas.sip

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class QgsMapOverviewCanvas : QWidget
3232
//! used for overview canvas to reflect changed extent in main map canvas
3333
void drawExtentRect();
3434

35-
// ### QGIS 3: rename so it does not look like getter, make protected
36-
void hasCrsTransformEnabled( bool flag );
37-
3835
// ### QGIS 3: make protected
3936
//! Should be called when the canvas destination CRS is changed
4037
void destinationCrsChanged();

python/plugins/processing/algs/qgis/FieldsCalculator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ def processAlgorithm(self, feedback):
100100

101101
da = QgsDistanceArea()
102102
da.setSourceCrs(layer.crs())
103-
da.setEllipsoidalMode(
104-
iface.mapCanvas().mapSettings().hasCrsTransformEnabled())
103+
da.setEllipsoidalMode(True)
105104
da.setEllipsoid(QgsProject.instance().readEntry(
106105
'Measure', '/Ellipsoid', GEO_NONE)[0])
107106
exp.setGeomCalculator(da)

python/plugins/processing/algs/qgis/FieldsMapper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ def processAlgorithm(self, feedback):
104104

105105
da = QgsDistanceArea()
106106
da.setSourceCrs(layer.crs())
107-
da.setEllipsoidalMode(
108-
iface.mapCanvas().mapSettings().hasCrsTransformEnabled())
107+
da.setEllipsoidalMode(True)
109108
da.setEllipsoid(QgsProject.instance().readEntry(
110109
'Measure', '/Ellipsoid', GEO_NONE)[0])
111110

python/plugins/processing/algs/qgis/ServiceAreaFromLayer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def processAlgorithm(self, feedback):
209209

210210
director.addStrategy(strategy)
211211
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
212-
iface.mapCanvas().hasCrsTransformEnabled(),
212+
True,
213213
tolerance)
214214

215215
feedback.pushInfo(self.tr('Loading start points...'))

python/plugins/processing/algs/qgis/ServiceAreaFromPoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def processAlgorithm(self, feedback):
192192

193193
director.addStrategy(strategy)
194194
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
195-
iface.mapCanvas().hasCrsTransformEnabled(),
195+
True,
196196
tolerance)
197197
feedback.pushInfo(self.tr('Building graph...'))
198198
snappedPoints = director.makeGraph(builder, [startPoint])

python/plugins/processing/algs/qgis/ShortestPathLayerToPoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def processAlgorithm(self, feedback):
203203

204204
director.addStrategy(strategy)
205205
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
206-
iface.mapCanvas().hasCrsTransformEnabled(),
206+
True,
207207
tolerance)
208208

209209
feedback.pushInfo(self.tr('Loading start points...'))

python/plugins/processing/algs/qgis/ShortestPathPointToLayer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def processAlgorithm(self, feedback):
203203

204204
director.addStrategy(strategy)
205205
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
206-
iface.mapCanvas().hasCrsTransformEnabled(),
206+
True,
207207
tolerance)
208208

209209
feedback.pushInfo(self.tr('Loading end points...'))

python/plugins/processing/algs/qgis/ShortestPathPointToPoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def processAlgorithm(self, feedback):
204204

205205
director.addStrategy(strategy)
206206
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
207-
iface.mapCanvas().hasCrsTransformEnabled(),
207+
True,
208208
tolerance)
209209
feedback.pushInfo(self.tr('Building graph...'))
210210
snappedPoints = director.makeGraph(builder, [startPoint, endPoint])

src/app/openstreetmap/qgsosmdownloaddialog.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,14 @@ void QgsOSMDownloadDialog::onExtentCanvas()
101101
{
102102
QgsRectangle r( QgisApp::instance()->mapCanvas()->extent() );
103103

104-
if ( QgisApp::instance()->mapCanvas()->hasCrsTransformEnabled() )
105-
{
106-
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );
104+
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );
107105

108-
QgsCoordinateTransform ct( QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs(), dst );
109-
r = ct.transformBoundingBox( r );
110-
if ( !r.isFinite() )
111-
{
112-
QMessageBox::information( this, tr( "OpenStreetMap download" ), tr( "Could not transform canvas extent." ) );
113-
return;
114-
}
106+
QgsCoordinateTransform ct( QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs(), dst );
107+
r = ct.transformBoundingBox( r );
108+
if ( !r.isFinite() )
109+
{
110+
QMessageBox::information( this, tr( "OpenStreetMap download" ), tr( "Could not transform canvas extent." ) );
111+
return;
115112
}
116113

117114
setRect( r );

src/app/qgisapp.cpp

Lines changed: 15 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,8 +2810,6 @@ void QgisApp::setupConnections()
28102810
this, &QgisApp::mapCanvas_keyPressed );
28112811

28122812
// connect renderer
2813-
connect( mMapCanvas, &QgsMapCanvas::hasCrsTransformEnabledChanged,
2814-
this, &QgisApp::hasCrsTransformEnabled );
28152813
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged,
28162814
this, &QgisApp::destinationCrsChanged );
28172815

@@ -3202,9 +3200,6 @@ void QgisApp::initLayerTreeView()
32023200
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument& ) ), mLayerTreeCanvasBridge, SLOT( writeProject( QDomDocument& ) ) );
32033201
connect( QgsProject::instance(), SIGNAL( readProject( QDomDocument ) ), mLayerTreeCanvasBridge, SLOT( readProject( QDomDocument ) ) );
32043202

3205-
bool otfTransformAutoEnable = QSettings().value( QStringLiteral( "/Projections/otfTransformAutoEnable" ), true ).toBool();
3206-
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( otfTransformAutoEnable );
3207-
32083203
mMapLayerOrder = new QgsCustomLayerOrderWidget( mLayerTreeCanvasBridge, this );
32093204
mMapLayerOrder->setObjectName( QStringLiteral( "theMapLayerOrder" ) );
32103205

@@ -4607,9 +4602,6 @@ void QgisApp::fileNew( bool promptToSaveFlag, bool forceBlank )
46074602
mMapCanvas->setMapUnits( srs.mapUnits() );
46084603
}
46094604

4610-
// enable OTF CRS transformation if necessary
4611-
mMapCanvas->setCrsTransformEnabled( settings.value( QStringLiteral( "/Projections/otfTransformEnabled" ), 0 ).toBool() );
4612-
46134605
updateCrsStatusBar();
46144606

46154607
/** New Empty Project Created
@@ -5357,11 +5349,6 @@ void QgisApp::openProject( QAction *action )
53575349
QString debugme = action->data().toString();
53585350
if ( saveDirty() )
53595351
addProject( debugme );
5360-
5361-
//set the projections enabled icon in the status bar
5362-
int myProjectionEnabledFlag =
5363-
QgsProject::instance()->readNumEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), 0 );
5364-
mMapCanvas->setCrsTransformEnabled( myProjectionEnabledFlag );
53655352
}
53665353

53675354
void QgisApp::runScript( const QString &filePath )
@@ -7582,15 +7569,7 @@ void QgisApp::editPaste( QgsMapLayer *destinationLayer )
75827569
return;
75837570

75847571
pasteVectorLayer->beginEditCommand( tr( "Features pasted" ) );
7585-
QgsFeatureList features;
7586-
if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() )
7587-
{
7588-
features = clipboard()->transformedCopyOf( pasteVectorLayer->crs(), pasteVectorLayer->fields() );
7589-
}
7590-
else
7591-
{
7592-
features = clipboard()->copyOf( pasteVectorLayer->fields() );
7593-
}
7572+
QgsFeatureList features = clipboard()->transformedCopyOf( pasteVectorLayer->crs(), pasteVectorLayer->fields() );
75947573
int nTotalFeatures = features.count();
75957574

75967575
QHash<int, int> remap;
@@ -8822,23 +8801,17 @@ void QgisApp::legendLayerZoomNative()
88228801
QgsDebugMsg( "Raster units per pixel : " + QString::number( layer->rasterUnitsPerPixelX() ) );
88238802
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
88248803

8825-
if ( mMapCanvas->hasCrsTransformEnabled() )
8826-
{
8827-
// get length of central canvas pixel width in source raster crs
8828-
QgsRectangle e = mMapCanvas->extent();
8829-
QSize s = mMapCanvas->mapSettings().outputSize();
8830-
QgsPoint p1( e.center().x(), e.center().y() );
8831-
QgsPoint p2( e.center().x() + e.width() / s.width(), e.center().y() + e.height() / s.height() );
8832-
QgsCoordinateTransform ct( mMapCanvas->mapSettings().destinationCrs(), layer->crs() );
8833-
p1 = ct.transform( p1 );
8834-
p2 = ct.transform( p2 );
8835-
double width = sqrt( p1.sqrDist( p2 ) ); // width (actually the diagonal) of reprojected pixel
8836-
mMapCanvas->zoomByFactor( sqrt( layer->rasterUnitsPerPixelX() * layer->rasterUnitsPerPixelX() + layer->rasterUnitsPerPixelY() * layer->rasterUnitsPerPixelY() ) / width );
8837-
}
8838-
else
8839-
{
8840-
mMapCanvas->zoomByFactor( qAbs( layer->rasterUnitsPerPixelX() / mMapCanvas->mapUnitsPerPixel() ) );
8841-
}
8804+
// get length of central canvas pixel width in source raster crs
8805+
QgsRectangle e = mMapCanvas->extent();
8806+
QSize s = mMapCanvas->mapSettings().outputSize();
8807+
QgsPoint p1( e.center().x(), e.center().y() );
8808+
QgsPoint p2( e.center().x() + e.width() / s.width(), e.center().y() + e.height() / s.height() );
8809+
QgsCoordinateTransform ct( mMapCanvas->mapSettings().destinationCrs(), layer->crs() );
8810+
p1 = ct.transform( p1 );
8811+
p2 = ct.transform( p2 );
8812+
double width = sqrt( p1.sqrDist( p2 ) ); // width (actually the diagonal) of reprojected pixel
8813+
mMapCanvas->zoomByFactor( sqrt( layer->rasterUnitsPerPixelX() * layer->rasterUnitsPerPixelX() + layer->rasterUnitsPerPixelY() * layer->rasterUnitsPerPixelY() ) / width );
8814+
88428815
mMapCanvas->refresh();
88438816
QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
88448817
}
@@ -9189,9 +9162,6 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
91899162
qobject_cast<QgsMeasureTool*>( mMapTools.mMeasureArea )->updateSettings();
91909163
qobject_cast<QgsMapToolMeasureAngle*>( mMapTools.mMeasureAngle )->updateSettings();
91919164

9192-
bool otfTransformAutoEnable = mySettings.value( QStringLiteral( "/Projections/otfTransformAutoEnable" ), true ).toBool();
9193-
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( otfTransformAutoEnable );
9194-
91959165
mMapCanvas->setSegmentationTolerance( mySettings.value( QStringLiteral( "/qgis/segmentationTolerance" ), "0.01745" ).toDouble() );
91969166
mMapCanvas->setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType( mySettings.value( QStringLiteral( "/qgis/segmentationToleranceType" ), "0" ).toInt() ) );
91979167

@@ -10311,33 +10281,16 @@ void QgisApp::updateCrsStatusBar()
1031110281
{
1031210282
mOnTheFlyProjectionStatusButton->setText( mMapCanvas->mapSettings().destinationCrs().authid() );
1031310283

10314-
if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() )
10315-
{
10316-
mOnTheFlyProjectionStatusButton->setToolTip(
10317-
tr( "Current CRS: %1 (OTF enabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
10318-
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
10319-
}
10320-
else
10321-
{
10322-
mOnTheFlyProjectionStatusButton->setText( tr( "%1 (OTF off)" ).arg( mOnTheFlyProjectionStatusButton->text() ) );
10323-
mOnTheFlyProjectionStatusButton->setToolTip(
10324-
tr( "Current CRS: %1 (OTF disabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
10325-
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionDisabled.svg" ) ) );
10326-
}
10284+
mOnTheFlyProjectionStatusButton->setToolTip(
10285+
tr( "Current CRS: %1" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
10286+
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
1032710287
}
1032810288

1032910289
void QgisApp::destinationCrsChanged()
1033010290
{
1033110291
updateCrsStatusBar();
1033210292
}
1033310293

10334-
void QgisApp::hasCrsTransformEnabled( bool flag )
10335-
{
10336-
// save this information to project
10337-
QgsProject::instance()->writeEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), ( flag ? 1 : 0 ) );
10338-
updateCrsStatusBar();
10339-
}
10340-
1034110294
// slot to update the progress bar in the status bar
1034210295
void QgisApp::showProgress( int progress, int totalSteps )
1034310296
{
@@ -11605,16 +11558,11 @@ void QgisApp::readProject( const QDomDocument &doc )
1160511558
projectChanged( doc );
1160611559

1160711560
// force update of canvas, without automatic changes to extent and OTF projections
11608-
bool autoEnableCrsTransform = mLayerTreeCanvasBridge->autoEnableCrsTransform();
1160911561
bool autoSetupOnFirstLayer = mLayerTreeCanvasBridge->autoSetupOnFirstLayer();
11610-
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( false );
1161111562
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( false );
1161211563

1161311564
mLayerTreeCanvasBridge->setCanvasLayers();
1161411565

11615-
if ( autoEnableCrsTransform )
11616-
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( true );
11617-
1161811566
if ( autoSetupOnFirstLayer )
1161911567
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( true );
1162011568
}

src/app/qgisapp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
11941194
void displayMessage( const QString& title, const QString& message, QgsMessageBar::MessageLevel level );
11951195
void removeMapToolMessage();
11961196
void updateMouseCoordinatePrecision();
1197-
void hasCrsTransformEnabled( bool flag );
11981197
void destinationCrsChanged();
11991198
// void debugHook();
12001199
//! Add a Layer Definition file

src/app/qgsmaptoollabel.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ void QgsMapToolLabel::createRubberBands()
105105
if ( mCanvas )
106106
{
107107
const QgsMapSettings& s = mCanvas->mapSettings();
108-
if ( s.hasCrsTransformEnabled() )
109-
{
110-
fixPoint = s.mapToLayerCoordinates( vlayer, fixPoint );
111-
}
108+
fixPoint = s.mapToLayerCoordinates( vlayer, fixPoint );
112109
}
113110

114111
QgsGeometry pointGeom = QgsGeometry::fromPoint( fixPoint );

0 commit comments

Comments
 (0)