Skip to content

Commit 6a8d80d

Browse files
committedOct 3, 2018
Alway use index from name
followup 2609815
1 parent 2609815 commit 6a8d80d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/gui/qgsattributeform.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,10 +1657,10 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt
16571657
newWidgetInfo.hint = fields.at( fldIdx ).comment();
16581658
}
16591659

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

16661666
break;

0 commit comments

Comments
 (0)
Please sign in to comment.