Skip to content
Permalink
Browse files

Fix missing definition in data defined buttons

Fixes #19110
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent da89f18 commit f6fa022910563369dd98b42b59f64a4e5473cd5a
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/gui/qgspropertyoverridebutton.cpp
@@ -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 )
{
@@ -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 );
@@ -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" ) );

0 comments on commit f6fa022

Please sign in to comment.
You can’t perform that action at this time.