Skip to content
Permalink
Browse files

Remove dead code

  • Loading branch information
nyalldawson committed Mar 12, 2019
1 parent f998ec9 commit fc4d9b8f7899501ad73940da73950abd8f88a515
Showing with 0 additions and 40 deletions.
  1. +0 −1 python/gui/auto_generated/qgsmapcanvas.sip.in
  2. +0 −34 src/gui/qgsmapcanvas.cpp
  3. +0 −5 src/gui/qgsmapcanvas.h
@@ -776,7 +776,6 @@ called to read map canvas settings from project
called to write map canvas settings to project
%End


void setMagnificationFactor( double factor );
%Docstring
Sets the factor of magnification to apply to the map canvas. Indeed, we
@@ -2132,40 +2132,6 @@ void QgsMapCanvas::writeProject( QDomDocument &doc )
// TODO: store only units, extent, projections, dest CRS
}

#if 0
void QgsMapCanvas::getDatumTransformInfo( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination )
{
if ( !source.isValid() || !destination.isValid() )
return;

//check if default datum transformation available
QgsSettings s;
QString settingsString = "/Projections/" + source.authid() + "//" + destination.authid();
QVariant defaultSrcTransform = s.value( settingsString + "_srcTransform" );
QVariant defaultDestTransform = s.value( settingsString + "_destTransform" );
if ( defaultSrcTransform.isValid() && defaultDestTransform.isValid() )
{
int sourceDatumTransform = defaultSrcTransform.toInt();
int destinationDatumTransform = defaultDestTransform.toInt();

QgsCoordinateTransformContext context = QgsProject::instance()->transformContext();
context.addSourceDestinationDatumTransform( source, destination, sourceDatumTransform, destinationDatumTransform );
QgsProject::instance()->setTransformContext( context );
return;
}

if ( !s.value( QStringLiteral( "/Projections/showDatumTransformDialog" ), false ).toBool() )
{
return;
}

//if several possibilities: present dialog
QgsDatumTransformDialog d( source, destination );
if ( d.availableTransformationCount() > 1 )
d.exec();
}
#endif

void QgsMapCanvas::zoomByFactor( double scaleFactor, const QgsPointXY *center )
{
if ( mScaleLocked )
@@ -678,11 +678,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
//! called to write map canvas settings to project
void writeProject( QDomDocument & );

#if 0
//! ask user about datum transformation
void getDatumTransformInfo( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination );
#endif

/**
* Sets the factor of magnification to apply to the map canvas. Indeed, we
* increase/decrease the DPI of the map settings according to this factor

0 comments on commit fc4d9b8

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