Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 22, 2019
1 parent f998ec9 commit fc4d9b8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
1 change: 0 additions & 1 deletion python/gui/auto_generated/qgsmapcanvas.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 0 additions & 34 deletions src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
5 changes: 0 additions & 5 deletions src/gui/qgsmapcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc4d9b8

Please sign in to comment.