Skip to content

Commit

Permalink
Fix multiple redraws when adding join from dialog
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15157 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 12, 2011
1 parent b701015 commit 6c75324
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -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 );
}
}
Expand Down Expand Up @@ -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 ) );
}

Expand Down

0 comments on commit 6c75324

Please sign in to comment.