Skip to content

Commit 0210d38

Browse files
committedDec 15, 2017
Fixes auto select foreign key when filters are updated
1 parent f4b007e commit 0210d38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎src/gui/editorwidgets/qgsrelationreferencewidget.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,18 @@ void QgsRelationReferenceWidget::filterChanged()
941941
}
942942

943943
mFilterModel->setFilteredFeatures( featureIds );
944+
945+
if ( mChainFilters && mComboBox->count() > 0 )
946+
{
947+
if ( scb->currentIndex() == 0 )
948+
{
949+
mComboBox->setCurrentIndex( 0 );
950+
}
951+
else if ( mComboBox->count() > 1 )
952+
{
953+
mComboBox->setCurrentIndex( 1 );
954+
}
955+
}
944956
}
945957

946958
void QgsRelationReferenceWidget::addEntry()

0 commit comments

Comments
 (0)