[QGIS Commit] r15157 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Feb 12 04:40:23 EST 2011
Author: mhugent
Date: 2011-02-12 01:40:23 -0800 (Sat, 12 Feb 2011)
New Revision: 15157
Modified:
trunk/qgis/src/app/qgsvectorlayerproperties.cpp
Log:
Fix multiple redraws when adding join from dialog
Modified: trunk/qgis/src/app/qgsvectorlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2011-02-11 19:17:22 UTC (rev 15156)
+++ trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2011-02-12 09:40:23 UTC (rev 15157)
@@ -1200,7 +1200,11 @@
}
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 @@
}
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 ) );
}
More information about the QGIS-commit
mailing list