This commit is contained in:
Juergen E. Fischer 2012-05-28 22:50:28 +02:00
parent 9f5f35aaa5
commit a965fca0b9
2 changed files with 11 additions and 0 deletions

View File

@ -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" );

View File

@ -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;