Skip to content
Permalink
Browse files

fix #5030

  • Loading branch information
jef-n committed May 28, 2012
1 parent 9f5f35a commit a965fca0b9a3deacef0a359d9329f2fa0a58e2a0
Showing with 11 additions and 0 deletions.
  1. +9 −0 src/gui/qgsprojectionselector.cpp
  2. +2 −0 src/gui/qgsprojectionselector.h
@@ -32,6 +32,7 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name,
, mUserProjListDone( false )
, mRecentProjListDone( false )
, mSearchColumn( NONE )
, mSkipFirstRecent( true )
{
Q_UNUSED( name );
setupUi( this );
@@ -548,6 +549,7 @@ void QgsProjectionSelector::loadUserCrsList( QSet<QString> *crsFilter )
// newItem->setText( EPSG_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) );
// display the qgis srs_id (field 1) in the third column of the list view
newItem->setText( QGIS_CRS_ID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) );
newItem->setText( AUTHID_COLUMN, QString( "USER:%1" ).arg( QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ).toInt() ) );
}
}
// close the sqlite3 statement
@@ -738,6 +740,7 @@ void QgsProjectionSelector::on_lstCoordinateSystems_currentItemChanged( QTreeWid
{
QgsDebugMsg( QString( "srs %1 not recent" ).arg( current->text( QGIS_CRS_ID_COLUMN ) ) );
lstRecent->clearSelection();
lstCoordinateSystems->setFocus( Qt::OtherFocusReason );
}
}
else
@@ -753,6 +756,12 @@ void QgsProjectionSelector::on_lstRecent_currentItemChanged( QTreeWidgetItem *cu
{
QgsDebugMsg( "Entered." );

if ( mSkipFirstRecent )
{
mSkipFirstRecent = true;
return;
}

if ( !current )
{
QgsDebugMsg( "no current item" );
@@ -184,6 +184,8 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
//! Has the User Projection List been populated?
bool mUserProjListDone;

bool mSkipFirstRecent;

//! Has the Recent Projection List been populated?
bool mRecentProjListDone;

0 comments on commit a965fca

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