[QGIS Commit] r9250 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Sep 2 17:55:15 EDT 2008


Author: jef
Date: 2008-09-02 17:55:15 -0400 (Tue, 02 Sep 2008)
New Revision: 9250

Modified:
   trunk/qgis/src/app/qgsattributetable.cpp
Log:
fix #1274

Modified: trunk/qgis/src/app/qgsattributetable.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetable.cpp	2008-09-02 18:56:23 UTC (rev 9249)
+++ trunk/qgis/src/app/qgsattributetable.cpp	2008-09-02 21:55:15 UTC (rev 9250)
@@ -103,12 +103,16 @@
 
 void QgsAttributeTable::setReadOnly( bool b )
 {
+  blockSignals(true);
+
   setEditTriggers( b ? QAbstractItemView::NoEditTriggers :
                    QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed );
   if ( !b )
   {
     setColumnReadOnly( 0, true );
   }
+
+  blockSignals(false);
 }
 
 void QgsAttributeTable::setColumnReadOnly( int col, bool ro )
@@ -435,6 +439,8 @@
 
 void QgsAttributeTable::fillTable( QgsVectorLayer *layer )
 {
+  blockSignals(true);
+
   const QgsFieldMap &fields = layer->pendingFields();
 
   // set up the column headers
@@ -482,6 +488,8 @@
   // Make each column wide enough to show all the contents
   for ( int i = 0; i < columnCount(); i++ )
     resizeColumnToContents( i );
+
+  blockSignals(false);
 }
 
 void QgsAttributeTable::putFeatureInTable( int row, const QgsFeature& fet )



More information about the QGIS-commit mailing list