mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
fix srs validation from threads
This commit is contained in:
parent
90580592d9
commit
9d0ffc20da
@ -317,6 +317,16 @@ static QgsMessageOutput *messageOutputViewer_()
|
||||
return new QgsMessageViewer( QgisApp::instance() );
|
||||
}
|
||||
|
||||
static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
|
||||
{
|
||||
QgisApp::instance()->emitCustomSrsValidation( srs );
|
||||
}
|
||||
|
||||
void QgisApp::emitCustomSrsValidation( QgsCoordinateReferenceSystem* srs )
|
||||
{
|
||||
emit customSrsValidation( srs );
|
||||
}
|
||||
|
||||
/**
|
||||
* This function contains forced validation of CRS used in QGIS.
|
||||
* There are 3 options depending on the settings:
|
||||
@ -324,7 +334,7 @@ static QgsMessageOutput *messageOutputViewer_()
|
||||
* - use project's CRS
|
||||
* - use predefined global CRS
|
||||
*/
|
||||
static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
|
||||
void QgisApp::validateSrs( QgsCoordinateReferenceSystem* srs )
|
||||
{
|
||||
static QString authid = QString::null;
|
||||
QSettings mySettings;
|
||||
@ -510,6 +520,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
|
||||
QgsMessageLog::logMessage( tr( "QGIS starting..." ) );
|
||||
|
||||
// set QGIS specific srs validation
|
||||
connect( this, SIGNAL( customSrsValidation( QgsCoordinateReferenceSystem * ) ),
|
||||
this, SLOT( validateSrs( QgsCoordinateReferenceSystem * ) ) );
|
||||
QgsCoordinateReferenceSystem::setCustomSrsValidation( customSrsValidation_ );
|
||||
|
||||
// set graphical message output
|
||||
|
@ -372,6 +372,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
//! @note added in 1.6
|
||||
void completeInitialization();
|
||||
|
||||
void emitCustomSrsValidation( QgsCoordinateReferenceSystem *crs );
|
||||
|
||||
public slots:
|
||||
//! Zoom to full extent
|
||||
void zoomFull();
|
||||
@ -486,6 +488,9 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
//! validate a SRS
|
||||
void validateSrs( QgsCoordinateReferenceSystem *crs );
|
||||
|
||||
//! QGis Sponsors
|
||||
void sponsors();
|
||||
//! About QGis
|
||||
@ -887,6 +892,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
|
||||
@note added in version 1.6*/
|
||||
void initializationCompleted();
|
||||
|
||||
void customSrsValidation( QgsCoordinateReferenceSystem *crs );
|
||||
|
||||
private:
|
||||
/** This method will open a dialog so the user can select the sublayers to load
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user