Skip to content

Commit

Permalink
fix #1274
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9250 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 2, 2008
1 parent 97808fb commit 1ca3099
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgsattributetable.cpp
Expand Up @@ -103,12 +103,16 @@ QgsAttributeTable::~QgsAttributeTable()

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 )
Expand Down Expand Up @@ -435,6 +439,8 @@ void QgsAttributeTable::copySelectedRows()

void QgsAttributeTable::fillTable( QgsVectorLayer *layer )
{
blockSignals(true);

const QgsFieldMap &fields = layer->pendingFields();

// set up the column headers
Expand Down Expand Up @@ -482,6 +488,8 @@ void QgsAttributeTable::fillTable( QgsVectorLayer *layer )
// 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 )
Expand Down

0 comments on commit 1ca3099

Please sign in to comment.