@@ -34,14 +34,16 @@ const int NAME_COLUMN = 0;
3434const int AUTHID_COLUMN = 1 ;
3535const int QGIS_CRS_ID_COLUMN = 2 ;
3636
37- QgsProjectionSelector::QgsProjectionSelector ( QWidget* parent, const char * name, Qt::WFlags fl )
37+ QgsProjectionSelector::QgsProjectionSelector ( QWidget* parent, const char *name, Qt::WFlags fl )
3838 : QWidget( parent, fl )
3939 , mProjListDone( false )
4040 , mUserProjListDone( false )
41+ , mRecentProjListDone( false )
4142 , mCRSNameSelectionPending( false )
4243 , mCRSIDSelectionPending( false )
4344 , mAuthIDSelectionPending( false )
4445{
46+ Q_UNUSED ( name );
4547 setupUi ( this );
4648 connect ( lstCoordinateSystems, SIGNAL ( currentItemChanged ( QTreeWidgetItem*, QTreeWidgetItem* ) ),
4749 this , SLOT ( coordinateSystemSelected ( QTreeWidgetItem* ) ) );
@@ -168,10 +170,12 @@ void QgsProjectionSelector::showEvent( QShowEvent * theEvent )
168170 applySelection ();
169171 }
170172
171- lstRecent->clear ();
172-
173- for ( int i = mRecentProjections .size () - 1 ; i >= 0 ; i-- )
174- insertRecent ( mRecentProjections .at ( i ).toLong () );
173+ if ( !mRecentProjListDone )
174+ {
175+ for ( int i = mRecentProjections .size () - 1 ; i >= 0 ; i-- )
176+ insertRecent ( mRecentProjections .at ( i ).toLong () );
177+ mRecentProjListDone = true ;
178+ }
175179
176180 // Pass up the inheritance hierarchy
177181 QWidget::showEvent ( theEvent );
@@ -858,10 +862,9 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
858862
859863void QgsProjectionSelector::on_lstRecent_currentItemChanged ( QTreeWidgetItem *current, QTreeWidgetItem *previous )
860864{
865+ Q_UNUSED ( previous );
861866 if ( current )
862- {
863867 setSelectedCrsId ( current->text ( QGIS_CRS_ID_COLUMN ).toLong () );
864- }
865868}
866869
867870void QgsProjectionSelector::on_pbnFind_clicked ()
0 commit comments