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

Minor optimization to transform control tool #1854

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jan 5, 2023

🦟 Bug fix

Summary

While working on gazebosim/gz-rendering#800, I noticed that the transform control tool does unnecessary ray queries every frame if the user mouse click does not register any models. This is because the mouseDirtry variable never gets reset and hence every frame the transform control tool will continue to try and handle the same mouse event and perform ray queries.

This PR refactors the mouse event handle logic to its own function and resets the variable mouseDirtry.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from mjcarroll as a code owner January 5, 2023 23:22
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jan 5, 2023
@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #1854 (50422fd) into ign-gazebo6 (68008d2) will increase coverage by 0.00%.
The diff coverage is 35.71%.

@@             Coverage Diff              @@
##           ign-gazebo6    #1854   +/-   ##
============================================
  Coverage        64.80%   64.80%           
============================================
  Files              322      322           
  Lines            26389    26391    +2     
============================================
+ Hits             17101    17103    +2     
  Misses            9288     9288           
Impacted Files Coverage Δ
.../gui/plugins/transform_control/TransformControl.cc 7.36% <0.00%> (+0.01%) ⬆️
...rc/systems/ackermann_steering/AckermannSteering.cc 85.50% <71.42%> (-0.17%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@azeey azeey requested a review from ahcorde January 9, 2023 19:58
@mjcarroll mjcarroll merged commit a48b7ad into ign-gazebo6 Jan 10, 2023
@mjcarroll mjcarroll deleted the transform_control_optimize branch January 10, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants