Skip to content
Permalink
Browse files

Fix relation table shows some cells disabled (when they should

be enabled, but just not editable)
  • Loading branch information
nyalldawson committed Jan 24, 2018
1 parent 237455a commit b91b9f6a6fd4d0fdc8916c1de3914bbe020a92ba
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/app/qgsrelationmanagerdialog.cpp
@@ -59,26 +59,25 @@ void QgsRelationManagerDialog::addRelation( const QgsRelation &rel )
mRelationsTable->setItem( row, 0, item );

item = new QTableWidgetItem( rel.referencedLayer()->name() );
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 1, item );

item = new QTableWidgetItem( rel.fieldPairs().at( 0 ).referencedField() );
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 2, item );

item = new QTableWidgetItem( rel.referencingLayer()->name() );
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 3, item );

item = new QTableWidgetItem( rel.fieldPairs().at( 0 ).referencingField() );
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 4, item );

item = new QTableWidgetItem( rel.id() );
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 5, item );


if ( rel.strength() == QgsRelation::RelationStrength::Composition )
{
item = new QTableWidgetItem( QStringLiteral( "Composition" ) );
@@ -87,7 +86,7 @@ void QgsRelationManagerDialog::addRelation( const QgsRelation &rel )
{
item = new QTableWidgetItem( QStringLiteral( "Association" ) );
}
item->setFlags( Qt::ItemIsEditable );
item->setFlags( Qt::ItemIsEnabled );
mRelationsTable->setItem( row, 6, item );

mRelationsTable->setSortingEnabled( true );

0 comments on commit b91b9f6

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