Disable execute when params are dirty #4001
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3997.
The bug
There are a few execution paths in
query.js
and not all apply "pending param changes" before execution. In this scenario changes have not been applied, executing the parameter's initial value instead of the pending value.The fix
Instead of coding
applyPendingChanges()
into every which way, made it so execution by button and shortcut are disabled when params are dirty.What is commit a02a2dc for?
Since the query page already listens to ctrl+enter, I previously had to disable the params listener to prevent multiple listeners from executing. But now that param dirty state disables the query shortcut, there's no risk of that happening, so the whole mechanism can be removed.