Skip to content
Permalink
Browse files

show message in status bar, when CRS of an added layer is undefined

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13307 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 13, 2010
1 parent 1797988 commit 97284a701ad4dae8d698b20a21730e817a0c310e
Showing with 5 additions and 2 deletions.
  1. +3 −1 src/app/qgisapp.cpp
  2. +2 −1 src/core/qgscoordinatereferencesystem.cpp
@@ -341,11 +341,13 @@ static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
// XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt'
toProj4 = QgsProject::instance()->readEntry( "SpatialRefSys", "//ProjectCRSProj4String", GEOPROJ4 );
QgsDebugMsg( "Layer srs set from project: " + toProj4 );
QgisApp::instance()->statusBar()->showMessage( QObject::tr( "CRS undefined - defaulting to project CRS" ) );
srs->createFromProj4( toProj4 );
}
else ///Projections/defaultBehaviour==useGlobal
{
srs->createFromProj4( mySettings.value( "/Projections/defaultProjectionString", GEOPROJ4 ).toString() );
QgisApp::instance()->statusBar()->showMessage( QObject::tr( "CRS undefined - defaulting to default CRS" ) );
}

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

statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );
// statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );

return true;
} // QgisApp::addVectorLayer()
@@ -245,7 +245,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
}
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromWkt(QString theWkt) using: " + theWkt );
QByteArray ba = theWkt.toLatin1();
const char *pWkt = ba;
const char *pWkt = ba.data();

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

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

0 comments on commit 97284a7

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