Skip to content

Commit 7aa72ab

Browse files
committedMay 20, 2015
populate join fields combobox if layer already selected
1 parent 3eb4af3 commit 7aa72ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎src/app/qgsjoindialog.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ QgsJoinDialog::QgsJoinDialog( QgsVectorLayer* layer, QList<QgsMapLayer*> already
4545
connect( mJoinLayerComboBox, SIGNAL( layerChanged( QgsMapLayer* ) ), this, SLOT( joinedLayerChanged( QgsMapLayer* ) ) );
4646

4747
mCacheInMemoryCheckBox->setChecked( true );
48+
49+
QgsMapLayer *joinLayer = mJoinLayerComboBox->currentLayer();
50+
if ( joinLayer->isValid() )
51+
{
52+
mJoinFieldComboBox->setLayer( joinLayer );
53+
joinedLayerChanged( joinLayer );
54+
}
4855
}
4956

5057
QgsJoinDialog::~QgsJoinDialog()
@@ -126,7 +133,6 @@ bool QgsJoinDialog::createAttributeIndex() const
126133

127134
void QgsJoinDialog::joinedLayerChanged( QgsMapLayer* layer )
128135
{
129-
130136
mJoinFieldComboBox->clear();
131137

132138
QgsVectorLayer* vLayer = dynamic_cast<QgsVectorLayer*>( layer );

0 commit comments

Comments
 (0)
Please sign in to comment.