Skip to content

Commit f6fa022

Browse files
committed
Fix missing definition in data defined buttons
Fixes #19110
1 parent da89f18 commit f6fa022

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/gui/qgspropertyoverridebutton.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ void QgsPropertyOverrideButton::updateGui()
690690
icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineExpressionError.svg" ) );
691691
deftip = tr( "Parse error: %1" ).arg( exp.parserErrorString() );
692692
}
693+
else
694+
{
695+
deftip = mExpressionString;
696+
}
693697
}
694698
else if ( mProperty.propertyType() != QgsProperty::ExpressionBasedProperty && hasField )
695699
{
@@ -700,6 +704,10 @@ void QgsPropertyOverrideButton::updateGui()
700704
icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconDataDefineError.svg" ) );
701705
deftip = tr( "'%1' field missing" ).arg( mFieldName );
702706
}
707+
else
708+
{
709+
deftip = mFieldName;
710+
}
703711
}
704712

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

727-
QString deftype( QLatin1String( "" ) );
735+
QString deftype;
728736
if ( deftip != tr( "undefined" ) )
729737
{
730738
deftype = QStringLiteral( " (%1)" ).arg( mProperty.propertyType() == QgsProperty::ExpressionBasedProperty ? tr( "expression" ) : tr( "field" ) );

0 commit comments

Comments
 (0)