Skip to content

Commit

Permalink
fixing override relations editor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed May 23, 2024
1 parent 38fe87a commit 6df2f07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/inpututils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ const QUrl InputUtils::getThemeIcon( const QString &name )
return QUrl( path );
}

const QUrl InputUtils::getFormEditorType( const QString &widgetNameIn, const QVariantMap &config, const QgsField &field, const QgsRelation &relation )
const QUrl InputUtils::getFormEditorType( const QString &widgetNameIn, const QVariantMap &config, const QgsField &field, const QgsRelation &relation, const QString &fieldName )
{
QString widgetName = widgetNameIn.toLower();

Expand Down Expand Up @@ -1129,7 +1129,7 @@ const QUrl InputUtils::getFormEditorType( const QString &widgetNameIn, const QVa
}

// Mind this hack - fields with `no-gallery-use` won't use gallery, but normal word tags instead
if ( field.name().contains( "nogallery", Qt::CaseInsensitive ) || field.alias().contains( "nogallery", Qt::CaseInsensitive ) )
if ( fieldName.contains( "nogallery", Qt::CaseInsensitive ) || field.alias().contains( "nogallery", Qt::CaseInsensitive ) )
{
useGallery = false;
}
Expand Down
2 changes: 1 addition & 1 deletion app/inpututils.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class InputUtils: public QObject
* \param config map coming from QGIS describing this field
* \param field qgsfield instance of this field
*/
Q_INVOKABLE static const QUrl getFormEditorType( const QString &widgetNameIn, const QVariantMap &config = QVariantMap(), const QgsField &field = QgsField(), const QgsRelation &relation = QgsRelation() );
Q_INVOKABLE static const QUrl getFormEditorType( const QString &widgetNameIn, const QVariantMap &config = QVariantMap(), const QgsField &field = QgsField(), const QgsRelation &relation = QgsRelation() , const QString &fieldName = QString() );

/**
* \copydoc QgsCoordinateFormatter::format()
Expand Down
2 changes: 1 addition & 1 deletion app/qml/form/MMFormPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Page {

source: {
if ( model.EditorWidget !== undefined ) {
return __inputUtils.getFormEditorType( model.EditorWidget, model.EditorWidgetConfig, model.Field, model.Relation )
return __inputUtils.getFormEditorType( model.EditorWidget, model.EditorWidgetConfig, model.Field, model.Relation, model.Name )
}

return ''
Expand Down

1 comment on commit 6df2f07

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 24.5.623511 just submitted!

Please sign in to comment.