Skip to content
Permalink
Browse files

Fix 'enable macros' button does not run open macro (fix #9523)

  • Loading branch information
nyalldawson committed Oct 31, 2016
1 parent a3186f8 commit fa3663907a706971bbc418a1896b48a14f572327
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/app/qgisapp.cpp
@@ -4970,8 +4970,6 @@ bool QgisApp::addProject( const QString& projectFile )
btnEnableMacros->setStyleSheet( QStringLiteral( "background-color: rgba(255, 255, 255, 0); color: black; text-decoration: underline;" ) );
btnEnableMacros->setCursor( Qt::PointingHandCursor );
btnEnableMacros->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
connect( btnEnableMacros, SIGNAL( clicked() ), mInfoBar, SLOT( popWidget() ) );
connect( btnEnableMacros, SIGNAL( clicked() ), this, SLOT( enableProjectMacros() ) );

QgsMessageBarItem *macroMsg = new QgsMessageBarItem(
tr( "Security warning" ),
@@ -4980,6 +4978,13 @@ bool QgisApp::addProject( const QString& projectFile )
QgsMessageBar::WARNING,
0,
mInfoBar );

connect( btnEnableMacros, &QToolButton::clicked, [this,macroMsg]
{
enableProjectMacros();
mInfoBar->popWidget( macroMsg );
} );

// display the macros notification widget
mInfoBar->pushItem( macroMsg );
}

1 comment on commit fa36639

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson commented on fa36639 Oct 31, 2016

Wheee lambdas! Sorry 2.14, ain't no chance of backporting this one :P

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