Skip to content
Permalink
Browse files

Use same relation parent/child order in list as in new relation dialog

Fixes #17939
  • Loading branch information
nyalldawson committed Jan 24, 2018
1 parent 717a0f5 commit 237455a78f99d4240e7a54d0a718b14c1ae65151
Showing with 26 additions and 8 deletions.
  1. +4 −4 src/app/qgsrelationmanagerdialog.cpp
  2. +22 −4 src/ui/qgsrelationmanagerdialogbase.ui
@@ -58,19 +58,19 @@ void QgsRelationManagerDialog::addRelation( const QgsRelation &rel )
item->setData( Qt::UserRole, QVariant::fromValue<QgsRelation>( rel ) );
mRelationsTable->setItem( row, 0, item );

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

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

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

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

@@ -35,33 +35,51 @@
</column>
<column>
<property name="text">
<string>Referencing Layer</string>
<string>Referenced Layer</string>
</property>
<property name="toolTip">
<string>Referenced Layer (Parent)</string>
</property>
</column>
<column>
<property name="text">
<string>Referencing Field</string>
<string>Referenced Field</string>
</property>
<property name="toolTip">
<string>Referenced Field</string>
</property>
</column>
<column>
<property name="text">
<string>Referenced Layer</string>
<string>Referencing Layer</string>
</property>
<property name="toolTip">
<string>Referencing Layer (Child)</string>
</property>
</column>
<column>
<property name="text">
<string>Referenced Field</string>
<string>Referencing Field</string>
</property>
<property name="toolTip">
<string>Referencing Field</string>
</property>
</column>
<column>
<property name="text">
<string>Id</string>
</property>
<property name="toolTip">
<string>Id</string>
</property>
</column>
<column>
<property name="text">
<string>Strength</string>
</property>
<property name="toolTip">
<string>Strength</string>
</property>
</column>
</widget>
</item>

0 comments on commit 237455a

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