Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
initialization of embeddet form only once
  • Loading branch information
signedav committed Jul 18, 2018
1 parent 56fe370 commit baf1b3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -556,7 +556,12 @@ void QgsRelationReferenceWidget::init()
// Only connect after iterating, to have only one iterator on the referenced table at once
connect( mComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRelationReferenceWidget::comboReferenceChanged );

updateAttributeEditorFrame( mFeature );
if ( !mFeatureInitialized )
{
//call it for the first intialization
emit mComboBox->currentIndexChanged( mComboBox->currentIndex() );
mFeatureInitialized = true;
}
QApplication::restoreOverrideCursor();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/editorwidgets/qgsrelationreferencewidget.h
Expand Up @@ -222,6 +222,7 @@ class GUI_EXPORT QgsRelationReferenceWidget : public QWidget
bool mIsEditable = true;
QStringList mFilterFields;
QMap<QString, QMap<QString, QSet<QString> > > mFilterCache;
bool mFeatureInitialized = false;

// Q_PROPERTY
bool mEmbedForm = false;
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsfeaturelistcombobox.cpp
Expand Up @@ -160,7 +160,6 @@ void QgsFeatureListComboBox::onDataChanged( const QModelIndex &topLeft, const QM
QModelIndex modelIndex = mModel->index( currentIndex, 0, QModelIndex() );
mLineEdit->setText( mModel->data( modelIndex, QgsFeatureFilterModel::ValueRole ).toString() );
}
emit currentIndexChanged( currentIndex );
}
}

Expand Down

0 comments on commit baf1b3a

Please sign in to comment.