Skip to content
Permalink
Browse files

fix joins edition (do not loose target field)

  • Loading branch information
3nids committed Mar 11, 2015
1 parent dcfc538 commit 827f84ee7f15bcc6997b16a2747d3ec0b3ea2aaf
Showing with 5 additions and 4 deletions.
  1. +1 −0 src/app/qgsjoindialog.cpp
  2. +4 −4 src/app/qgsvectorlayerproperties.cpp
@@ -39,6 +39,7 @@ QgsJoinDialog::QgsJoinDialog( QgsVectorLayer* layer, QList<QgsMapLayer*> already
alreadyJoinedLayers.append( layer );

mTargetFieldComboBox->setLayer( mLayer );

mJoinLayerComboBox->setExceptedLayerList( alreadyJoinedLayers );
connect( mJoinLayerComboBox, SIGNAL( layerChanged( QgsMapLayer* ) ), mJoinFieldComboBox, SLOT( setLayer( QgsMapLayer* ) ) );
connect( mJoinLayerComboBox, SIGNAL( layerChanged( QgsMapLayer* ) ), this, SLOT( joinedLayerChanged( QgsMapLayer* ) ) );
@@ -1026,7 +1026,6 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
}

}

}

void QgsVectorLayerProperties::on_mButtonAddJoin_clicked()
@@ -1094,15 +1093,16 @@ void QgsVectorLayerProperties::on_mButtonEditJoin_clicked()
QgsJoinDialog d( layer, joinedLayers );
d.setJoinInfo( joins[j] );


if ( d.exec() == QDialog::Accepted )
{
QgsVectorJoinInfo info = d.joinInfo();

// remove old join
layer->removeJoin( currentJoinItem->data( 0, Qt::UserRole ).toString() );
layer->removeJoin( joinLayerId );
mJoinTreeWidget->takeTopLevelItem( mJoinTreeWidget->indexOfTopLevelItem( currentJoinItem ) );

// add the new edited
QgsVectorJoinInfo info = d.joinInfo();


//create attribute index if possible
if ( d.createAttributeIndex() )

0 comments on commit 827f84e

Please sign in to comment.
You can’t perform that action at this time.