0001-Fix-4495.patch

Nathan Woodrow, 2011-11-03 02:26 PM

Download (1.69 KB)

View differences:

src/app/qgslabelinggui.cpp
492 492

  
493 493
void QgsLabelingGui::showExpressionDialog()
494 494
{
495
  //TODO extract this out to a dialog.
496 495
  QgsExpressionBuilderDialog dlg( mLayer, cboFieldName->currentText() , this );
497 496
  dlg.setWindowTitle( tr( "Expression based label" ) );
498 497
  if ( dlg.exec() == QDialog::Accepted )
src/core/qgspallabeling.cpp
463 463
      QgsDebugMsg( "Expression parser error:" + exp->parserErrorString() );
464 464
      return;
465 465
    }
466
    QVariant result = exp->evaluate( &f, layer->dataProvider()->fields() );
466
    QVariant result = exp->evaluate( &f, layer->pendingFields() );
467 467
    if ( exp->hasEvalError() )
468 468
    {
469 469
      QgsDebugMsg( "Expression parser eval error:" + exp->evalErrorString() );
......
785 785
      fldIndex =  layer->fieldNameIndex( name );
786 786
      attrIndices.insert( fldIndex );
787 787
    }
788

  
789
    if ( fldIndex == -1 )
790
      return 0;
791 788
  }
792 789
  else
793 790
  {
794
-