Skip to content

Commit 3d2b69e

Browse files
committed
Qt 5.5 compatibility
1 parent fdd0087 commit 3d2b69e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/gui/qgsaggregatetoolbutton.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,16 @@ void QgsAggregateToolButton::aboutToShowMenu()
4343
{
4444
mMenu->clear();
4545

46+
QAction *action = mMenu->addAction( tr( "Exclude" ) );
47+
connect( action, &QAction::triggered, [ this ]
48+
{
49+
setActive( false );
50+
} );
51+
4652
for ( const auto &aggregate : qgis::as_const( mAvailableAggregates ) )
4753
{
48-
mMenu->addAction( aggregate.name, this, [ this, aggregate ]
54+
QAction *action = mMenu->addAction( aggregate.name );
55+
connect( action, &QAction::triggered, [ this, aggregate ]
4956
{
5057
setText( aggregate.name );
5158
setAggregate( aggregate.function );
@@ -95,6 +102,7 @@ void QgsAggregateToolButton::setAggregate( const QString &aggregate )
95102
if ( agg.function == aggregate )
96103
{
97104
mAggregate = aggregate;
105+
setText( agg.name );
98106
break;
99107
}
100108
}

0 commit comments

Comments
 (0)