mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[processing] Fix missing [optional] text in string parameter label
Fixes #19817
This commit is contained in:
parent
195539d7d3
commit
8790c4c99e
@ -124,7 +124,10 @@ QLabel *QgsAbstractProcessingParameterWidgetWrapper::createLabel()
|
||||
case QgsProcessingGui::Standard:
|
||||
case QgsProcessingGui::Modeler:
|
||||
{
|
||||
std::unique_ptr< QLabel > label = qgis::make_unique< QLabel >( mParameterDefinition->description() );
|
||||
QString description = mParameterDefinition->description();
|
||||
if ( parameterDefinition()->flags() & QgsProcessingParameterDefinition::FlagOptional )
|
||||
description = QObject::tr( "%1 [optional]" ).arg( description );
|
||||
std::unique_ptr< QLabel > label = qgis::make_unique< QLabel >( description );
|
||||
label->setToolTip( mParameterDefinition->toolTip() );
|
||||
return label.release();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user