Skip to content
Permalink
Browse files

Alway use index from name

followup 2609815
  • Loading branch information
elpaso committed Oct 3, 2018
1 parent 2609815 commit 6a8d80d5975371fe74d56db528e8208aa78d8ad3
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/qgsattributeform.cpp
@@ -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;

0 comments on commit 6a8d80d

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