Skip to content

Commit

Permalink
Merge remote-tracking branch 'brushtyler/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Nov 8, 2011
2 parents c37b63a + 98d5a76 commit eda69e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/gui/qgsprojectionselector.cpp
Expand Up @@ -37,6 +37,7 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name,
: QWidget( parent, fl ) : QWidget( parent, fl )
, mProjListDone( false ) , mProjListDone( false )
, mUserProjListDone( false ) , mUserProjListDone( false )
, mRecentProjListDone( false )
, mCRSNameSelectionPending( false ) , mCRSNameSelectionPending( false )
, mCRSIDSelectionPending( false ) , mCRSIDSelectionPending( false )
, mAuthIDSelectionPending( false ) , mAuthIDSelectionPending( false )
Expand Down Expand Up @@ -168,10 +169,12 @@ void QgsProjectionSelector::showEvent( QShowEvent * theEvent )
applySelection(); applySelection();
} }


lstRecent->clear(); if ( !mRecentProjListDone )

{
for ( int i = mRecentProjections.size() - 1; i >= 0; i-- ) for ( int i = mRecentProjections.size() - 1; i >= 0; i-- )
insertRecent( mRecentProjections.at( i ).toLong() ); insertRecent( mRecentProjections.at( i ).toLong() );
mRecentProjListDone = true;
}


// Pass up the inheritance hierarchy // Pass up the inheritance hierarchy
QWidget::showEvent( theEvent ); QWidget::showEvent( theEvent );
Expand Down Expand Up @@ -859,7 +862,8 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
void QgsProjectionSelector::on_lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *previous ) void QgsProjectionSelector::on_lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *previous )
{ {
Q_UNUSED( previous ); Q_UNUSED( previous );
setSelectedCrsId( current->text( QGIS_CRS_ID_COLUMN ).toLong() ); if ( current )
setSelectedCrsId( current->text( QGIS_CRS_ID_COLUMN ).toLong() );
} }


void QgsProjectionSelector::on_pbnFind_clicked() void QgsProjectionSelector::on_pbnFind_clicked()
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsprojectionselector.h
Expand Up @@ -187,6 +187,9 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
//! Has the User Projection List been populated? //! Has the User Projection List been populated?
bool mUserProjListDone; bool mUserProjListDone;


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

//! Is there a pending selection to be made by CRS Name? //! Is there a pending selection to be made by CRS Name?
bool mCRSNameSelectionPending; bool mCRSNameSelectionPending;


Expand Down

0 comments on commit eda69e6

Please sign in to comment.