Skip to content

Commit 6c75324

Browse files
author
mhugent
committed
Fix multiple redraws when adding join from dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15157 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b701015 commit 6c75324

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/qgsvectorlayerproperties.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,11 @@ void QgsVectorLayerProperties::on_mButtonAddJoin_clicked()
12001200
}
12011201

12021202
layer->addJoin( info );
1203+
1204+
//prevent complete redraw for each row
1205+
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
12031206
loadRows(); //update attribute tab
1207+
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
12041208
addJoinToTreeWidget( info );
12051209
}
12061210
}
@@ -1237,7 +1241,11 @@ void QgsVectorLayerProperties::on_mButtonRemoveJoin_clicked()
12371241
}
12381242

12391243
layer->removeJoin( currentJoinItem->data( 0, Qt::UserRole ).toString() );
1244+
1245+
//prevent complete redraw for each row
1246+
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
12401247
loadRows();
1248+
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
12411249
mJoinTreeWidget->takeTopLevelItem( mJoinTreeWidget->indexOfTopLevelItem( currentJoinItem ) );
12421250
}
12431251

0 commit comments

Comments
 (0)