Skip to content
Permalink
Browse files

[composer] Don't update atlas filter until editing finished, prevente…

…d, prevents errors while creating filter expression
  • Loading branch information
nyalldawson committed Jan 7, 2014
1 parent 22514b6 commit 9c5bbb7a156dda5966c54d6082edab1f1789e014
Showing with 5 additions and 4 deletions.
  1. +4 −3 src/app/composer/qgsatlascompositionwidget.cpp
  2. +1 −1 src/app/composer/qgsatlascompositionwidget.h
@@ -404,15 +404,15 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_textChanged( const QString& text )
void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_editingFinished()
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
}

atlasMap->setFeatureFilter( text );
atlasMap->setFeatureFilter( mAtlasFeatureFilterEdit->text() );
updateAtlasFeatures();
}

@@ -431,8 +431,9 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterButton_clicked()
QString expression = exprDlg.expressionText();
if ( !expression.isEmpty() )
{
// will emit a textChanged signal
mAtlasFeatureFilterEdit->setText( expression );
atlasMap->setFeatureFilter( mAtlasFeatureFilterEdit->text() );
updateAtlasFeatures();
}
}
}
@@ -47,7 +47,7 @@ class QgsAtlasCompositionWidget:
void on_mAtlasSortFeatureCheckBox_stateChanged( int state );
void on_mAtlasSortFeatureKeyComboBox_currentIndexChanged( int index );
void on_mAtlasSortFeatureDirectionButton_clicked();
void on_mAtlasFeatureFilterEdit_textChanged( const QString& text );
void on_mAtlasFeatureFilterEdit_editingFinished();
void on_mAtlasFeatureFilterButton_clicked();
void on_mAtlasFeatureFilterCheckBox_stateChanged( int state );
void on_mAtlasMarginSpinBox_valueChanged( int value );

0 comments on commit 9c5bbb7

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