Skip to content
Permalink
Browse files

Fix relation manager mess when adding new relations

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 2b033c1acb60a046793302986c1f023c3bf010a9
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/app/qgsrelationmanagerdialog.cpp
@@ -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 );

@@ -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()

0 comments on commit 2b033c1

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