fix restoration of identify mode

This commit is contained in:
Juergen E. Fischer 2014-04-30 17:28:58 +02:00
parent e1ace3a74d
commit 6f1b875aec

View File

@ -289,12 +289,13 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge
lstResults->setColumnWidth( 0, width ); lstResults->setColumnWidth( 0, width );
} }
// retrieve mode before on_cmbIdentifyMode_currentIndexChanged resets it on addItem
int identifyMode = mySettings.value( "/Map/identifyMode", 0 ).toInt();
cmbIdentifyMode->addItem( tr( "Current layer" ), 0 ); cmbIdentifyMode->addItem( tr( "Current layer" ), 0 );
cmbIdentifyMode->addItem( tr( "Top down, stop at first" ), 1 ); cmbIdentifyMode->addItem( tr( "Top down, stop at first" ), 1 );
cmbIdentifyMode->addItem( tr( "Top down" ), 2 ); cmbIdentifyMode->addItem( tr( "Top down" ), 2 );
cmbIdentifyMode->addItem( tr( "Layer selection" ), 3 ); cmbIdentifyMode->addItem( tr( "Layer selection" ), 3 );
int identifyMode = mySettings.value( "/Map/identifyMode", 0 ).toInt();
cmbIdentifyMode->setCurrentIndex( cmbIdentifyMode->findData( identifyMode ) ); cmbIdentifyMode->setCurrentIndex( cmbIdentifyMode->findData( identifyMode ) );
cbxAutoFeatureForm->setChecked( mySettings.value( "/Map/identifyAutoFeatureForm", false ).toBool() ); cbxAutoFeatureForm->setChecked( mySettings.value( "/Map/identifyAutoFeatureForm", false ).toBool() );