@@ -37,6 +37,7 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name,
37
37
: QWidget( parent, fl )
38
38
, mProjListDone( false )
39
39
, mUserProjListDone( false )
40
+ , mRecentProjListDone( false )
40
41
, mCRSNameSelectionPending( false )
41
42
, mCRSIDSelectionPending( false )
42
43
, mAuthIDSelectionPending( false )
@@ -168,10 +169,12 @@ void QgsProjectionSelector::showEvent( QShowEvent * theEvent )
168
169
applySelection ();
169
170
}
170
171
171
- lstRecent->clear ();
172
-
173
- for ( int i = mRecentProjections .size () - 1 ; i >= 0 ; i-- )
174
- insertRecent ( mRecentProjections .at ( i ).toLong () );
172
+ if ( !mRecentProjListDone )
173
+ {
174
+ for ( int i = mRecentProjections .size () - 1 ; i >= 0 ; i-- )
175
+ insertRecent ( mRecentProjections .at ( i ).toLong () );
176
+ mRecentProjListDone = true ;
177
+ }
175
178
176
179
// Pass up the inheritance hierarchy
177
180
QWidget::showEvent ( theEvent );
@@ -859,7 +862,8 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
859
862
void QgsProjectionSelector::on_lstRecent_currentItemChanged ( QTreeWidgetItem *current, QTreeWidgetItem *previous )
860
863
{
861
864
Q_UNUSED ( previous );
862
- setSelectedCrsId ( current->text ( QGIS_CRS_ID_COLUMN ).toLong () );
865
+ if ( current )
866
+ setSelectedCrsId ( current->text ( QGIS_CRS_ID_COLUMN ).toLong () );
863
867
}
864
868
865
869
void QgsProjectionSelector::on_pbnFind_clicked ()
0 commit comments