Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removes calling to messagebar widget only after having enabled properly the project macros #1159

Closed
wants to merge 1 commit into from

Conversation

slarosa
Copy link
Member

@slarosa slarosa commented Feb 10, 2014

@wonder-sk
Copy link
Member

Thanks for the patch - it seems this may however pop an unrelated widget from the message bar if QGIS does not ask whether to enable macros...

@slarosa
Copy link
Member Author

slarosa commented Feb 12, 2014

true, but I could not find a case where that could happen. maybe I am wrong but the enableProjectMacros function is only called on loading of a project and I don't think in these cases that might happen.

However, an alternative might be to check over the setting value:

QSettings s;
if ( s.value( "/qgis/enableMacros" ).toInt() == 1 )
{
  mInfoBar->popWidget();
}

Thanks for reviewing!

@brushtyler
Copy link
Contributor

We may use popWidget(QgsMessageBarItem *item), but it must to be to a slot (it's a public method right now).

Then just use connect( btnEnableMacros, SIGNAL( clicked() ), mInfoBar, SLOT( popWidget(macroMsg) ) );.

@mhugent
Copy link
Contributor

mhugent commented Mar 7, 2014

assigned to @wonder-sk

@slarosa slarosa closed this May 30, 2014
@slarosa slarosa deleted the fixes_9523 branch May 30, 2014 11:37
@slarosa slarosa restored the fixes_9523 branch May 30, 2014 13:28
@slarosa slarosa deleted the fixes_9523 branch October 12, 2020 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants