Skip to content
Permalink
Browse files

Fix multiple redraws when adding join from dialog

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15157 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 12, 2011
1 parent b701015 commit 6c75324b37a21e2a1034f2ff17464adb592363e9
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/app/qgsvectorlayerproperties.cpp
@@ -1200,7 +1200,11 @@ void QgsVectorLayerProperties::on_mButtonAddJoin_clicked()
}

layer->addJoin( info );

//prevent complete redraw for each row
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
loadRows(); //update attribute tab
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
addJoinToTreeWidget( info );
}
}
@@ -1237,7 +1241,11 @@ void QgsVectorLayerProperties::on_mButtonRemoveJoin_clicked()
}

layer->removeJoin( currentJoinItem->data( 0, Qt::UserRole ).toString() );

//prevent complete redraw for each row
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
loadRows();
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
mJoinTreeWidget->takeTopLevelItem( mJoinTreeWidget->indexOfTopLevelItem( currentJoinItem ) );
}

0 comments on commit 6c75324

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