Skip to content
Permalink
Browse files

Fix crash when using select by expression from attribute table dialog

(cherry picked from commit 00c4d4a)
  • Loading branch information
nyalldawson committed Jan 17, 2019
1 parent 8127c70 commit 3edf0f6cb06a0954666126c6143b0016b411d62b
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/gui/qgsexpressionselectiondialog.cpp
@@ -134,19 +134,23 @@ void QgsExpressionSelectionDialog::mActionRemoveFromSelection_triggered()

void QgsExpressionSelectionDialog::pushSelectedFeaturesMessage()
{
int count = mLayer->selectedFeatureCount();
if ( !mMessageBar )
return;

const int timeout = QgsSettings().value( QStringLiteral( "qgis/messageTimeout" ), 5 ).toInt();
const int count = mLayer->selectedFeatureCount();
if ( count > 0 )
{
mMessageBar->pushMessage( QString(),
tr( "%1 matching %2 selected" ).arg( count )
.arg( count == 1 ? tr( "feature" ) : tr( "features" ) ),
Qgis::Info );
Qgis::Info, timeout );
}
else
{
mMessageBar->pushMessage( QString(),
tr( "No matching features found" ),
Qgis::Warning );
Qgis::Warning, timeout );
}
}

0 comments on commit 3edf0f6

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