obs-websocket icon indicating copy to clipboard operation
obs-websocket copied to clipboard

HandleSceneItemTransformChanged Event handler fix

Open vladuskaxgod opened this issue 4 months ago • 1 comments

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?

  1. Subscribed with SceneItems only; verified SceneItemTransformChanged now received on item move/resize.
  2. Unsubscribed; verified events cease.
  3. Regression: Other SceneItems events (create/remove/select) still delivered.
  4. 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 master or a release/* branch.
  • [x] The code has been tested.
  • [x] I have included updates to all appropriate documentation.

vladuskaxgod avatar Aug 25 '25 19:08 vladuskaxgod

@tt2468 bump

vladuskaxgod avatar Oct 04 '25 05:10 vladuskaxgod