Skip to content

Commit

Permalink
Fixes auto select foreign key when filters are updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Dec 15, 2017
1 parent f4b007e commit 0210d38
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -941,6 +941,18 @@ void QgsRelationReferenceWidget::filterChanged()
}

mFilterModel->setFilteredFeatures( featureIds );

if ( mChainFilters && mComboBox->count() > 0 )
{
if ( scb->currentIndex() == 0 )
{
mComboBox->setCurrentIndex( 0 );
}
else if ( mComboBox->count() > 1 )
{
mComboBox->setCurrentIndex( 1 );
}
}
}

void QgsRelationReferenceWidget::addEntry()
Expand Down

0 comments on commit 0210d38

Please sign in to comment.