Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #5030
  • Loading branch information
jef-n committed May 28, 2012
1 parent 9f5f35a commit a965fca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/qgsprojectionselector.cpp
Expand Up @@ -32,6 +32,7 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name,
, mUserProjListDone( false )
, mRecentProjListDone( false )
, mSearchColumn( NONE )
, mSkipFirstRecent( true )
{
Q_UNUSED( name );
setupUi( this );
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -753,6 +756,12 @@ void QgsProjectionSelector::on_lstRecent_currentItemChanged( QTreeWidgetItem *cu
{
QgsDebugMsg( "Entered." );

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

if ( !current )
{
QgsDebugMsg( "no current item" );
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsprojectionselector.h
Expand Up @@ -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;

Expand Down

0 comments on commit a965fca

Please sign in to comment.