Skip to content

Commit

Permalink
Improved search for the relation reference widget
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 15, 2016
1 parent 86afa4e commit 94b0de5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -19,6 +19,7 @@
#include <QDialog>
#include <QHBoxLayout>
#include <QTimer>
#include <QCompleter>

#include "qgsattributeform.h"
#include "qgsattributetablefiltermodel.h"
Expand Down Expand Up @@ -543,6 +544,14 @@ void QgsRelationReferenceWidget::init()

mComboBox->setModel( mFeatureListModel );

delete mComboBox->completer();
QCompleter* completer = new QCompleter( mComboBox->model(), mComboBox );
completer->setModel( mComboBox->model() );
completer->setFilterMode( Qt::MatchContains );
completer->setCaseSensitivity( Qt::CaseInsensitive );
mComboBox->setCompleter( completer );


QVariant nullValue = QSettings().value( QStringLiteral( "qgis/nullValue" ), "NULL" );

if ( mChainFilters && mFeature.isValid() )
Expand Down

0 comments on commit 94b0de5

Please sign in to comment.