Skip to content

Commit 44091ae

Browse files
author
jef
committed
show message in status bar, when CRS of an added layer is undefined
git-svn-id: http://svn.osgeo.org/qgis/trunk@13307 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b6bc442 commit 44091ae

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/app/qgisapp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,13 @@ static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
341341
// XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt'
342342
toProj4 = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
343343
QgsDebugMsg( "Layer srs set from project: " + toProj4 );
344+
QgisApp::instance()->statusBar()->showMessage( QObject::tr( "CRS undefined - defaulting to project CRS" ) );
344345
srs->createFromProj4( toProj4 );
345346
}
346347
else ///Projections/defaultBehaviour==useGlobal
347348
{
348349
srs->createFromProj4( mySettings.value( "/Projections/defaultProjectionString", GEOPROJ4 ).toString() );
350+
QgisApp::instance()->statusBar()->showMessage( QObject::tr( "CRS undefined - defaulting to default CRS" ) );
349351
}
350352

351353
}
@@ -2603,7 +2605,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS
26032605
// Let render() do its own cursor management
26042606
// QApplication::restoreOverrideCursor();
26052607

2606-
statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );
2608+
// statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );
26072609

26082610
return true;
26092611
} // QgisApp::addVectorLayer()

src/core/qgscoordinatereferencesystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
245245
}
246246
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromWkt(QString theWkt) using: " + theWkt );
247247
QByteArray ba = theWkt.toLatin1();
248-
const char *pWkt = ba;
248+
const char *pWkt = ba.data();
249249

250250
OGRErr myInputResult = OSRImportFromWkt( mCRS, ( char ** ) & pWkt );
251251

@@ -254,6 +254,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
254254
QgsDebugMsg( "\n---------------------------------------------------------------" );
255255
QgsDebugMsg( "This CRS could *** NOT *** be set from the supplied Wkt " );
256256
QgsDebugMsg( "INPUT: " + theWkt );
257+
QgsDebugMsg( QString( "UNUSED WKT: %1" ).arg( pWkt ) );
257258
QgsDebugMsg( "---------------------------------------------------------------\n" );
258259
return mIsValidFlag;
259260
}

0 commit comments

Comments
 (0)