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

[bugfix] Fixes #16852 by adding click_x and click_y variables to resolve actions #5597

Merged
merged 2 commits into from
Nov 15, 2017

Conversation

pblottiere
Copy link
Member

@pblottiere pblottiere commented Nov 10, 2017

Description

Layer actions triggered by identify + right click don't have click_x and click_y variables populated (see https://issues.qgis.org/issues/16852).

Some tests have been added.

This PR supersedes #5071.

Checklist

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and containt sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

@pblottiere
Copy link
Member Author

@m-kuhn I think you had reviewed the initial work. Can you give me your opinion on this PR if you have some time?

Thank you!

@pblottiere
Copy link
Member Author

I'll merge this PR tomorrow if no comments come in the meantime.

*
* \since QGIS 3.0
*/
void setExpressionContextScope( const QgsExpressionContextScope &scope );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the implementation in mind completely right now, please bear with me ;)

Is there a QgsAction for each menuitem (or other means to trigger it) or a (shared) one in the registry? I.e. is there a risk of concurrency / race condition when an action is displayed in the feature form and the attribute table at the same time and both use this setter for different scopes on the same action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the QgsActionMenu::reloadActions method, it seems that there's well a QgsAction for each item in the menu. So I don't think there's a risk of concurrency in this case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good for me then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants