Skip to content

Commit

Permalink
Fix relation manager mess when adding new relations
Browse files Browse the repository at this point in the history
The table showed wrong information because it didn't take sorting into account
and relied on stable row numbers.
  • Loading branch information
m-kuhn committed Oct 18, 2016
1 parent 17510f0 commit 2b033c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsrelationmanagerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void QgsRelationManagerDialog::setLayers( const QList< QgsVectorLayer* >& layers

void QgsRelationManagerDialog::addRelation( const QgsRelation &rel )
{
mRelationsTable->setSortingEnabled( false );
int row = mRelationsTable->rowCount();
mRelationsTable->insertRow( row );

Expand Down Expand Up @@ -74,6 +75,7 @@ void QgsRelationManagerDialog::addRelation( const QgsRelation &rel )
item = new QTableWidgetItem( rel.id() );
item->setFlags( Qt::ItemIsEditable );
mRelationsTable->setItem( row, 5, item );
mRelationsTable->setSortingEnabled( true );
}

void QgsRelationManagerDialog::on_mBtnAddRelation_clicked()
Expand Down

0 comments on commit 2b033c1

Please sign in to comment.