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.
This fixes a issue where the addon keeps generating previews on every change as soon as the "update preview once" button is tapped at least once
I believe this also fixes #121 although the issue did not include sufficient detail to pin point the root cause.
reproduce steps:
root cause analysys
I think this is because
showPreviewManual.value = False
did not work as intended. Although it's counter intuitive, it actually makes sense if you think about it. A change made in event handler would trigger another event and resulting in infinite loop. I think Fusion is smart enough to ignore such changes to avoid hanging up.The fix
I implemented this fix with a global variable because I can't think of a better way. It works during my testing but I honestly don't know if this fix will introduce unexpected side effects. Suggestions are very welcomed.