obs-websocket
obs-websocket copied to clipboard
HandleSceneItemTransformChanged Event handler fix
Description
This PR fixes #1295. Unify SceneItemTransformChanged under the general SceneItems subscription:
- Removed EventSubscription::SceneItemTransformChanged enum value and related _sceneItemTransformChangedRef counter logic.
- Updated event metadata (@eventSubscription tag) and BroadcastEvent calls to use EventSubscription::SceneItems.
- Eliminated redundant runtime check that suppressed the event when no dedicated subscribers existed (now covered by normal SceneItems subscription filtering).
Motivation and Context
The SceneItemTransformChanged event was effectively broken: the dedicated ref counter (_sceneItemTransformChangedRef) was never incremented for normal SceneItems subscriptions, so the early ref check caused the handler to return every time. As a result, clients subscribing to SceneItems did not receive transform change events. Removing the unused subscription flag, its ref bookkeeping, and the premature check fixes the dispatch and simplifies the API.
How Has This Been Tested?
- Subscribed with SceneItems only; verified SceneItemTransformChanged now received on item move/resize.
- Unsubscribed; verified events cease.
- Regression: Other SceneItems events (create/remove/select) still delivered.
- Monitored for unintended extra events (none observed). Tested OS(s): Windows 11 x64.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- Code cleanup (non-breaking change which makes code smaller or more readable)
Checklist:
- [x] I have read the Contributing Guidelines.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] My code is not on
masteror arelease/*branch. - [x] The code has been tested.
- [x] I have included updates to all appropriate documentation.
@tt2468 bump