Skip to content
Permalink
Browse files

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
  • Loading branch information
nyalldawson committed Feb 28, 2017
1 parent 809d30f commit 20c07a58e63370b062b3d1d6acf742671a8c4a0c
Showing with 398 additions and 873 deletions.
  1. +15 −0 doc/api_break.dox
  2. +0 −5 python/core/qgsmapsettings.sip
  3. +0 −5 python/core/qgstracer.sip
  4. +0 −5 python/gui/layertree/qgslayertreemapcanvasbridge.sip
  5. +0 −11 python/gui/qgsmapcanvas.sip
  6. +0 −3 python/gui/qgsmapoverviewcanvas.sip
  7. +1 −2 python/plugins/processing/algs/qgis/FieldsCalculator.py
  8. +1 −2 python/plugins/processing/algs/qgis/FieldsMapper.py
  9. +1 −1 python/plugins/processing/algs/qgis/ServiceAreaFromLayer.py
  10. +1 −1 python/plugins/processing/algs/qgis/ServiceAreaFromPoint.py
  11. +1 −1 python/plugins/processing/algs/qgis/ShortestPathLayerToPoint.py
  12. +1 −1 python/plugins/processing/algs/qgis/ShortestPathPointToLayer.py
  13. +1 −1 python/plugins/processing/algs/qgis/ShortestPathPointToPoint.py
  14. +7 −10 src/app/openstreetmap/qgsosmdownloaddialog.cpp
  15. +15 −67 src/app/qgisapp.cpp
  16. +0 −1 src/app/qgisapp.h
  17. +1 −4 src/app/qgsmaptoollabel.cpp
  18. +6 −12 src/app/qgsmaptoolmovelabel.cpp
  19. +8 −14 src/app/qgsmaptoolpinlabels.cpp
  20. +36 −39 src/app/qgsmaptoolselectutils.cpp
  21. +11 −14 src/app/qgsmaptoolshowhidelabels.cpp
  22. +0 −19 src/app/qgsoptions.cpp
  23. +16 −69 src/app/qgsprojectproperties.cpp
  24. +1 −4 src/app/qgsprojectproperties.h
  25. +0 −1 src/core/composer/qgscomposermap.cpp
  26. +2 −3 src/core/dxf/qgsdxfexport.cpp
  27. +2 −5 src/core/qgsmaphittest.cpp
  28. +9 −12 src/core/qgsmaprendererjob.cpp
  29. +52 −99 src/core/qgsmapsettings.cpp
  30. +0 −6 src/core/qgsmapsettings.h
  31. +3 −3 src/core/qgssnappingutils.cpp
  32. +0 −6 src/core/qgstolerance.cpp
  33. +3 −13 src/core/qgstracer.cpp
  34. +0 −7 src/core/qgstracer.h
  35. +5 −12 src/core/qgsvectorlayerdiagramprovider.cpp
  36. +6 −9 src/core/qgsvectorlayerlabelprovider.cpp
  37. +3 −34 src/gui/layertree/qgslayertreemapcanvasbridge.cpp
  38. +0 −6 src/gui/layertree/qgslayertreemapcanvasbridge.h
  39. +2 −3 src/gui/layertree/qgslayertreeviewdefaultactions.cpp
  40. +11 −13 src/gui/qgshighlight.cpp
  41. +0 −28 src/gui/qgsmapcanvas.cpp
  42. +0 −11 src/gui/qgsmapcanvas.h
  43. +0 −1 src/gui/qgsmapcanvastracer.cpp
  44. +0 −6 src/gui/qgsmapoverviewcanvas.cpp
  45. +0 −3 src/gui/qgsmapoverviewcanvas.h
  46. +1 −1 src/gui/qgsmaptoolidentify.cpp
  47. +2 −7 src/gui/qgsprojectionselectionwidget.cpp
  48. +1 −8 src/plugins/grass/qgsgrassmoduleoptions.cpp
  49. +12 −15 src/plugins/grass/qgsgrassregion.cpp
  50. +1 −3 src/plugins/spatialquery/qgsspatialquerydialog.cpp
  51. +14 −29 src/server/services/wms/qgswmsrenderer.cpp
  52. +118 −156 src/ui/qgsoptionsbase.ui
  53. +28 −28 src/ui/qgsprojectpropertiesbase.ui
  54. +0 −3 tests/bench/qgsbench.cpp
  55. +0 −2 tests/src/app/testqgsattributetable.cpp
  56. +0 −2 tests/src/app/testqgsfieldcalculator.cpp
  57. +0 −3 tests/src/app/testqgsmaptoolidentifyaction.cpp
  58. +0 −4 tests/src/app/testqgsmeasuretool.cpp
  59. +0 −1 tests/src/core/testqgscomposermap.cpp
  60. +0 −1 tests/src/core/testqgscomposermapgrid.cpp
  61. +0 −2 tests/src/core/testqgsinvertedpolygonrenderer.cpp
  62. +0 −1 tests/src/core/testqgstracer.cpp
  63. +0 −25 tests/src/gui/testprojectionissues.cpp
  64. +0 −1 tests/src/python/test_qgscomposerlabel.py
  65. +0 −4 tests/src/python/test_qgscomposerlegend.py
  66. +0 −1 tests/src/python/test_qgscomposermapgrid.py
  67. +0 −2 tests/src/python/test_qgspallabeling_base.py
  68. +0 −2 tests/src/python/utilities.py
@@ -1257,6 +1257,12 @@ QgsLayerTreeNode {#qgis_api_break_3_0_QgsLayerTreeNode}
- readXml() does not resolve layers from the layer IDs anymore. Call resolveReferences() or use readXml() override with QgsProject as the second argument.


QgsLayerTreeMapCanvasBridge {#qgis_api_break_3_0_QgsLayerTreeMapCanvasBridge}
-----------------

- setAutoEnableCrsTransform() and autoEnableCrsTransform() were removed. CRS transformation is now always enabled.


QgsLayerTreeModel {#qgis_api_break_3_0_QgsLayerTreeMode}
-----------------

@@ -1315,6 +1321,7 @@ QgsMapCanvas {#qgis_api_break_3_0_QgsMapCanvas}
- setProgress() signal has been removed. It was not emitted since 2.0.
- 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.
- the duplicate mapToolSet signal with a single QgsMapTool argument has been removed. Use the signal with arguments for new and old map tool instead.
- setCrsTransformEnabled(), hasCrsTransformEnabled(), hasCrsTransformEnabledChanged() were removed. CRS transformation is now always enabled.

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

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


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


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


QgsTracer {#qgis_api_break_3_0_QgsTracer}
---------

- hasCrsTransformEnabled() and setCrsTransformEnabled() were removed. CRS transformation is now always enabled when required.


QgsTreeWidgetItem {#qgis_api_break_3_0_QgsTreeWidgetItem}
-----------------

@@ -83,11 +83,6 @@ class QgsMapSettings
*/
void setCustomRenderFlags( const QString& customRenderFlags );

//! sets whether to use projections for this layer set
void setCrsTransformEnabled( bool enabled );
//! returns true if projections are enabled for this layer set
bool hasCrsTransformEnabled() const;

//! sets destination coordinate reference system
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
//! returns CRS of destination coordinate reference system
@@ -20,11 +20,6 @@ class QgsTracer : QObject
//! Set layers used for tracing
void setLayers( const QList<QgsVectorLayer*>& layers );

//! Return true if reprojection to destination CRS is enabled
bool hasCrsTransformEnabled() const;
//! Set whether to do reprojection to destination CRS
void setCrsTransformEnabled( bool enabled );

//! Get CRS used for tracing
QgsCoordinateReferenceSystem destinationCrs() const;
//! Set CRS used for tracing
@@ -45,11 +45,6 @@ class QgsLayerTreeMapCanvasBridge : QObject
void setAutoSetupOnFirstLayer( bool enabled );
bool autoSetupOnFirstLayer() const;

//! if enabled, will automatically turn on on-the-fly reprojection of layers if a layer
//! with different source CRS is added
void setAutoEnableCrsTransform( bool enabled );
bool autoEnableCrsTransform() const;

public slots:
void setHasCustomLayerOrder( bool state );
void setCustomLayerOrder( const QStringList& order );
@@ -36,10 +36,6 @@ class QgsMapCanvas : QGraphicsView
//! @note added in 2.4
const QgsMapSettings& mapSettings() const /KeepReference/;

//! sets whether to use projections for this layer set
//! @note added in 2.4
void setCrsTransformEnabled( bool enabled );

//! sets destination coordinate reference system
//! @note added in 2.4
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
@@ -360,9 +356,6 @@ class QgsMapCanvas : QGraphicsView
//! State of render suppression flag
bool renderFlag();

//! A simple helper method to find out if on the fly projections are enabled or not
bool hasCrsTransformEnabled();

//! stop rendering (if there is any right now)
//! @note added in 2.4
void stopRendering();
@@ -454,10 +447,6 @@ class QgsMapCanvas : QGraphicsView
//! Emitted when zoom next status changed
void zoomNextStatusChanged( bool );

//! Emitted when on-the-fly projection has been turned on/off
//! @note added in 2.4
void hasCrsTransformEnabledChanged( bool flag );

//! Emitted when map CRS has changed
//! @note added in 2.4
void destinationCrsChanged();
@@ -32,9 +32,6 @@ class QgsMapOverviewCanvas : QWidget
//! used for overview canvas to reflect changed extent in main map canvas
void drawExtentRect();

// ### QGIS 3: rename so it does not look like getter, make protected
void hasCrsTransformEnabled( bool flag );

// ### QGIS 3: make protected
//! Should be called when the canvas destination CRS is changed
void destinationCrsChanged();
@@ -100,8 +100,7 @@ def processAlgorithm(self, feedback):

da = QgsDistanceArea()
da.setSourceCrs(layer.crs())
da.setEllipsoidalMode(
iface.mapCanvas().mapSettings().hasCrsTransformEnabled())
da.setEllipsoidalMode(True)
da.setEllipsoid(QgsProject.instance().readEntry(
'Measure', '/Ellipsoid', GEO_NONE)[0])
exp.setGeomCalculator(da)
@@ -104,8 +104,7 @@ def processAlgorithm(self, feedback):

da = QgsDistanceArea()
da.setSourceCrs(layer.crs())
da.setEllipsoidalMode(
iface.mapCanvas().mapSettings().hasCrsTransformEnabled())
da.setEllipsoidalMode(True)
da.setEllipsoid(QgsProject.instance().readEntry(
'Measure', '/Ellipsoid', GEO_NONE)[0])

@@ -209,7 +209,7 @@ def processAlgorithm(self, feedback):

director.addStrategy(strategy)
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
iface.mapCanvas().hasCrsTransformEnabled(),
True,
tolerance)

feedback.pushInfo(self.tr('Loading start points...'))
@@ -192,7 +192,7 @@ def processAlgorithm(self, feedback):

director.addStrategy(strategy)
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
iface.mapCanvas().hasCrsTransformEnabled(),
True,
tolerance)
feedback.pushInfo(self.tr('Building graph...'))
snappedPoints = director.makeGraph(builder, [startPoint])
@@ -203,7 +203,7 @@ def processAlgorithm(self, feedback):

director.addStrategy(strategy)
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
iface.mapCanvas().hasCrsTransformEnabled(),
True,
tolerance)

feedback.pushInfo(self.tr('Loading start points...'))
@@ -203,7 +203,7 @@ def processAlgorithm(self, feedback):

director.addStrategy(strategy)
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
iface.mapCanvas().hasCrsTransformEnabled(),
True,
tolerance)

feedback.pushInfo(self.tr('Loading end points...'))
@@ -204,7 +204,7 @@ def processAlgorithm(self, feedback):

director.addStrategy(strategy)
builder = QgsGraphBuilder(iface.mapCanvas().mapSettings().destinationCrs(),
iface.mapCanvas().hasCrsTransformEnabled(),
True,
tolerance)
feedback.pushInfo(self.tr('Building graph...'))
snappedPoints = director.makeGraph(builder, [startPoint, endPoint])
@@ -101,17 +101,14 @@ void QgsOSMDownloadDialog::onExtentCanvas()
{
QgsRectangle r( QgisApp::instance()->mapCanvas()->extent() );

if ( QgisApp::instance()->mapCanvas()->hasCrsTransformEnabled() )
{
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );
QgsCoordinateReferenceSystem dst = QgsCoordinateReferenceSystem::fromSrsId( GEOCRS_ID );

QgsCoordinateTransform ct( QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs(), dst );
r = ct.transformBoundingBox( r );
if ( !r.isFinite() )
{
QMessageBox::information( this, tr( "OpenStreetMap download" ), tr( "Could not transform canvas extent." ) );
return;
}
QgsCoordinateTransform ct( QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs(), dst );
r = ct.transformBoundingBox( r );
if ( !r.isFinite() )
{
QMessageBox::information( this, tr( "OpenStreetMap download" ), tr( "Could not transform canvas extent." ) );
return;
}

setRect( r );
@@ -2810,8 +2810,6 @@ void QgisApp::setupConnections()
this, &QgisApp::mapCanvas_keyPressed );

// connect renderer
connect( mMapCanvas, &QgsMapCanvas::hasCrsTransformEnabledChanged,
this, &QgisApp::hasCrsTransformEnabled );
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged,
this, &QgisApp::destinationCrsChanged );

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

bool otfTransformAutoEnable = QSettings().value( QStringLiteral( "/Projections/otfTransformAutoEnable" ), true ).toBool();
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( otfTransformAutoEnable );

mMapLayerOrder = new QgsCustomLayerOrderWidget( mLayerTreeCanvasBridge, this );
mMapLayerOrder->setObjectName( QStringLiteral( "theMapLayerOrder" ) );

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

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

updateCrsStatusBar();

/** New Empty Project Created
@@ -5357,11 +5349,6 @@ void QgisApp::openProject( QAction *action )
QString debugme = action->data().toString();
if ( saveDirty() )
addProject( debugme );

//set the projections enabled icon in the status bar
int myProjectionEnabledFlag =
QgsProject::instance()->readNumEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), 0 );
mMapCanvas->setCrsTransformEnabled( myProjectionEnabledFlag );
}

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

pasteVectorLayer->beginEditCommand( tr( "Features pasted" ) );
QgsFeatureList features;
if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() )
{
features = clipboard()->transformedCopyOf( pasteVectorLayer->crs(), pasteVectorLayer->fields() );
}
else
{
features = clipboard()->copyOf( pasteVectorLayer->fields() );
}
QgsFeatureList features = clipboard()->transformedCopyOf( pasteVectorLayer->crs(), pasteVectorLayer->fields() );
int nTotalFeatures = features.count();

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

if ( mMapCanvas->hasCrsTransformEnabled() )
{
// get length of central canvas pixel width in source raster crs
QgsRectangle e = mMapCanvas->extent();
QSize s = mMapCanvas->mapSettings().outputSize();
QgsPoint p1( e.center().x(), e.center().y() );
QgsPoint p2( e.center().x() + e.width() / s.width(), e.center().y() + e.height() / s.height() );
QgsCoordinateTransform ct( mMapCanvas->mapSettings().destinationCrs(), layer->crs() );
p1 = ct.transform( p1 );
p2 = ct.transform( p2 );
double width = sqrt( p1.sqrDist( p2 ) ); // width (actually the diagonal) of reprojected pixel
mMapCanvas->zoomByFactor( sqrt( layer->rasterUnitsPerPixelX() * layer->rasterUnitsPerPixelX() + layer->rasterUnitsPerPixelY() * layer->rasterUnitsPerPixelY() ) / width );
}
else
{
mMapCanvas->zoomByFactor( qAbs( layer->rasterUnitsPerPixelX() / mMapCanvas->mapUnitsPerPixel() ) );
}
// get length of central canvas pixel width in source raster crs
QgsRectangle e = mMapCanvas->extent();
QSize s = mMapCanvas->mapSettings().outputSize();
QgsPoint p1( e.center().x(), e.center().y() );
QgsPoint p2( e.center().x() + e.width() / s.width(), e.center().y() + e.height() / s.height() );
QgsCoordinateTransform ct( mMapCanvas->mapSettings().destinationCrs(), layer->crs() );
p1 = ct.transform( p1 );
p2 = ct.transform( p2 );
double width = sqrt( p1.sqrDist( p2 ) ); // width (actually the diagonal) of reprojected pixel
mMapCanvas->zoomByFactor( sqrt( layer->rasterUnitsPerPixelX() * layer->rasterUnitsPerPixelX() + layer->rasterUnitsPerPixelY() * layer->rasterUnitsPerPixelY() ) / width );

mMapCanvas->refresh();
QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
}
@@ -9189,9 +9162,6 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
qobject_cast<QgsMeasureTool*>( mMapTools.mMeasureArea )->updateSettings();
qobject_cast<QgsMapToolMeasureAngle*>( mMapTools.mMeasureAngle )->updateSettings();

bool otfTransformAutoEnable = mySettings.value( QStringLiteral( "/Projections/otfTransformAutoEnable" ), true ).toBool();
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( otfTransformAutoEnable );

mMapCanvas->setSegmentationTolerance( mySettings.value( QStringLiteral( "/qgis/segmentationTolerance" ), "0.01745" ).toDouble() );
mMapCanvas->setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType( mySettings.value( QStringLiteral( "/qgis/segmentationToleranceType" ), "0" ).toInt() ) );

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

if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() )
{
mOnTheFlyProjectionStatusButton->setToolTip(
tr( "Current CRS: %1 (OTF enabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
}
else
{
mOnTheFlyProjectionStatusButton->setText( tr( "%1 (OTF off)" ).arg( mOnTheFlyProjectionStatusButton->text() ) );
mOnTheFlyProjectionStatusButton->setToolTip(
tr( "Current CRS: %1 (OTF disabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionDisabled.svg" ) ) );
}
mOnTheFlyProjectionStatusButton->setToolTip(
tr( "Current CRS: %1" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) );
mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) );
}

void QgisApp::destinationCrsChanged()
{
updateCrsStatusBar();
}

void QgisApp::hasCrsTransformEnabled( bool flag )
{
// save this information to project
QgsProject::instance()->writeEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), ( flag ? 1 : 0 ) );
updateCrsStatusBar();
}

// slot to update the progress bar in the status bar
void QgisApp::showProgress( int progress, int totalSteps )
{
@@ -11605,16 +11558,11 @@ void QgisApp::readProject( const QDomDocument &doc )
projectChanged( doc );

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

mLayerTreeCanvasBridge->setCanvasLayers();

if ( autoEnableCrsTransform )
mLayerTreeCanvasBridge->setAutoEnableCrsTransform( true );

if ( autoSetupOnFirstLayer )
mLayerTreeCanvasBridge->setAutoSetupOnFirstLayer( true );
}
@@ -1194,7 +1194,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void displayMessage( const QString& title, const QString& message, QgsMessageBar::MessageLevel level );
void removeMapToolMessage();
void updateMouseCoordinatePrecision();
void hasCrsTransformEnabled( bool flag );
void destinationCrsChanged();
// void debugHook();
//! Add a Layer Definition file
@@ -105,10 +105,7 @@ void QgsMapToolLabel::createRubberBands()
if ( mCanvas )
{
const QgsMapSettings& s = mCanvas->mapSettings();
if ( s.hasCrsTransformEnabled() )
{
fixPoint = s.mapToLayerCoordinates( vlayer, fixPoint );
}
fixPoint = s.mapToLayerCoordinates( vlayer, fixPoint );
}

QgsGeometry pointGeom = QgsGeometry::fromPoint( fixPoint );

0 comments on commit 20c07a5

Please sign in to comment.
You can’t perform that action at this time.