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

Action Map Editor fixes and improvements #59514

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

EricEzaM
Copy link
Contributor

@EricEzaM EricEzaM commented Mar 25, 2022

Multiple fixes:

  • Fixed device not being updated correctly (changing the device dropdown did not actually change the underlying event's device)
  • Device selection now defaults to All Devices
  • Device is now displayed in the text shown in the input event editor, and in the action list.
  • There was code running twice previously because of the following interaction: 1) input via "Listen for Input" tab. 2) _set_event gets called. 3) input list tree selection gets updated to match the listened event. 4) tree "item_selection" signal is emitted. 5) eventually _set_event is called again.
  • The only reason this was not an infinite loop is because reselection is disabled on the tree. So, the code runs twice - not a big deal, but it is unnecessary processing and it could cause an issue in the future. If someone turns on reselection on the tree, the whole thing comes crashing down. This should prevent that scenario and make the code a bit safer and more robust.

Closes #53708 (what was left after #53734 was merged)
Closes #26880 as per @Calinou's suggestion #26880 (comment)
Closes #60065

image
image

@EricEzaM EricEzaM added this to the 4.0 milestone Mar 25, 2022
@EricEzaM EricEzaM force-pushed the input-editor-fixes branch 2 times, most recently from 25906a2 to 3594fd7 Compare March 25, 2022 14:03
@EricEzaM EricEzaM force-pushed the input-editor-fixes branch 2 times, most recently from 40d1ad2 to d87cb25 Compare March 25, 2022 14:30
Multiple fixes:
* Fixed device not being updated correctly (changing the device dropdown did not actually change the underlying event's device)
* Device selection now defaults to `All Devices`
* Device is now displayed in the text shown in the input event editor, and in the action list.
* There was code running twice previously because of the following interaction: 1) input via "Listen for Input" tab. 2) `_set_event` gets called. 3) input list tree selection gets updated to match the listened event. 4) tree "item_selection" signal is emitted. 5) eventually `_set_event` is called again.
* The only reason this was not an infinite loop is because reselection is disabled on the tree. So, the code runs twice - not a big deal, but it is unnecessary processing and it could cause an issue in the future. If someone turns on reselection on the tree, the whole thing comes crashing down. This should prevent that scenario and make the code a bit safer and more robust.
@akien-mga akien-mga merged commit aba8427 into godotengine:master Apr 11, 2022
@akien-mga
Copy link
Member

Thanks!

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