Skip to content

Commit

Permalink
Alway use index from name
Browse files Browse the repository at this point in the history
followup 2609815
  • Loading branch information
elpaso committed Oct 3, 2018
1 parent 2609815 commit 6a8d80d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -1657,10 +1657,10 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt
newWidgetInfo.hint = fields.at( fldIdx ).comment();
}

newWidgetInfo.labelOnTop = mLayer->editFormConfig().labelOnTop( fieldDef->idx() );
newWidgetInfo.labelText = mLayer->attributeDisplayName( fieldDef->idx() );
newWidgetInfo.labelOnTop = mLayer->editFormConfig().labelOnTop( fldIdx );
newWidgetInfo.labelText = mLayer->attributeDisplayName( fldIdx );
newWidgetInfo.labelText.replace( '&', QStringLiteral( "&&" ) ); // need to escape '&' or they'll be replace by _ in the label text
newWidgetInfo.toolTip = QStringLiteral( "<b>%1</b><p>%2</p>" ).arg( mLayer->attributeDisplayName( fieldDef->idx() ), newWidgetInfo.hint );
newWidgetInfo.toolTip = QStringLiteral( "<b>%1</b><p>%2</p>" ).arg( mLayer->attributeDisplayName( fldIdx ), newWidgetInfo.hint );
newWidgetInfo.showLabel = widgetDef->showLabel();

break;
Expand Down

0 comments on commit 6a8d80d

Please sign in to comment.