File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -108,17 +108,17 @@ void QgsDualView::columnBoxInit()
108108 QString displayExpression = mLayerCache ->layer ()->displayExpression ();
109109
110110 // if no display expression is saved: use display field instead
111- if ( displayExpression == " " )
111+ if ( displayExpression. isEmpty () )
112112 {
113- if ( mLayerCache ->layer ()->displayField () != " " )
113+ if ( ! mLayerCache ->layer ()->displayField (). isEmpty () )
114114 {
115115 defaultField = mLayerCache ->layer ()->displayField ();
116116 displayExpression = QString ( " COALESCE(\" %1\" , '<NULL>')" ).arg ( defaultField );
117117 }
118118 }
119119
120- // if neither diaplay expression nor display field is saved...
121- if ( displayExpression == " " )
120+ // if neither display expression nor display field is saved...
121+ if ( displayExpression. isEmpty () )
122122 {
123123 QgsAttributeList pkAttrs = mLayerCache ->layer ()->pkAttributeList ();
124124
@@ -169,7 +169,7 @@ void QgsDualView::columnBoxInit()
169169
170170 if ( mLayerCache ->layer ()->editFormConfig ()->widgetType ( fieldIndex ) != " Hidden" )
171171 {
172- QIcon icon = QgsApplication::getThemeIcon ( " /mActionNewAttribute.png " );
172+ QIcon icon = mLayerCache -> layer ()-> fields (). iconForField ( fieldIndex );
173173 QString text = field.name ();
174174
175175 // Generate action for the preview popup button of the feature list
You can’t perform that action at this time.
0 commit comments