0001-Proper-handling-of-NULL-value-for-combobox.patch

Matthias Kuhn, 2012-08-29 11:49 PM

Download (1.44 KB)

View differences:

src/gui/qgsattributeeditor.cpp
209 209
        if ( !data.mFilterAttributeColumn.isNull() )
210 210
          fi = layer->fieldNameIndex( data.mFilterAttributeColumn );
211 211

  
212
        if ( data.mAllowNull )
213
          map.insert( nullValue, tr( "(no selection)" ) );
214

  
215 212
        if ( ki >= 0 && vi >= 0 )
216 213
        {
217 214
          QgsAttributeList attributes;
......
236 233
        QComboBox *cb = comboBox( editor, parent );
237 234
        if ( cb )
238 235
        {
236
          if ( data.mAllowNull )
237
            cb->addItem( tr( "(no selection)" ), nullValue );
239 238
          for ( QMap< QString, QString >::const_iterator it = map.begin(); it != map.end(); it++ )
240 239
          {
241 240
            if ( data.mOrderByValue )
242
-