Skip to content

Commit

Permalink
[attributeform] Fix value relation editor widget fail to bind to a UI…
Browse files Browse the repository at this point in the history
… form combo box
  • Loading branch information
nirvn authored and nyalldawson committed Jan 24, 2024
1 parent 9c1f48d commit ca3a823
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ QWidget *QgsValueRelationWidgetWrapper::createWidget( QWidget *parent )

void QgsValueRelationWidgetWrapper::initWidget( QWidget *editor )
{

mComboBox = qobject_cast<QgsToolTipComboBox *>( editor );
mComboBox = qobject_cast<QComboBox *>( editor );
mTableWidget = qobject_cast<QgsFilteredTableWidget *>( editor );
mLineEdit = qobject_cast<QLineEdit *>( editor );

Expand Down Expand Up @@ -510,7 +509,7 @@ QVariant::Type QgsValueRelationWidgetWrapper::fkType() const
return QVariant::Type::Invalid;
}

void QgsValueRelationWidgetWrapper::populate( )
void QgsValueRelationWidgetWrapper::populate()
{
// Initialize, note that signals are blocked, to avoid double signals on new features
if ( QgsValueRelationFieldFormatter::expressionRequiresFormScope( mExpression ) ||
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class GUI_EXPORT QgsValueRelationWidgetWrapper : public QgsEditorWidgetWrapper
//! Sets the values for the widgets, re-creates the cache when required
void populate( );

QgsToolTipComboBox *mComboBox = nullptr;
QComboBox *mComboBox = nullptr;
QgsFilteredTableWidget *mTableWidget = nullptr;
QLineEdit *mLineEdit = nullptr;
int mSubWidgetSignalBlocking = 0; //! Set to non-zero when a endless loop of notifications could happen.
Expand Down

0 comments on commit ca3a823

Please sign in to comment.