Skip to content

Commit

Permalink
Fix missing definition in data defined buttons
Browse files Browse the repository at this point in the history
Fixes #19110
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent da89f18 commit f6fa022
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/qgspropertyoverridebutton.cpp
Expand Up @@ -690,6 +690,10 @@ void QgsPropertyOverrideButton::updateGui()
icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineExpressionError.svg" ) );
deftip = tr( "Parse error: %1" ).arg( exp.parserErrorString() );
}
else
{
deftip = mExpressionString;
}
}
else if ( mProperty.propertyType() != QgsProperty::ExpressionBasedProperty && hasField )
{
Expand All @@ -700,6 +704,10 @@ void QgsPropertyOverrideButton::updateGui()
icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineError.svg" ) );
deftip = tr( "'%1' field missing" ).arg( mFieldName );
}
else
{
deftip = mFieldName;
}
}

setIcon( icon );
Expand All @@ -724,7 +732,7 @@ void QgsPropertyOverrideButton::updateGui()
mFullDescription += tr( "<b>Valid input types:</b><br>%1<br>" ).arg( mDataTypesString );
}

QString deftype( QLatin1String( "" ) );
QString deftype;
if ( deftip != tr( "undefined" ) )
{
deftype = QStringLiteral( " (%1)" ).arg( mProperty.propertyType() == QgsProperty::ExpressionBasedProperty ? tr( "expression" ) : tr( "field" ) );
Expand Down

0 comments on commit f6fa022

Please sign in to comment.