mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Fix flip/rotate transform menu with group items
Fixes an issue where the user could not perform a horizontal/vertical flip, or rotate group sub-items via the transform context menu.
This commit is contained in:
parent
e6dd009386
commit
62d08fe38f
|
@ -5589,6 +5589,9 @@ static void SetItemTL(obs_sceneitem_t *item, const vec3 &tl)
|
|||
static bool RotateSelectedSources(obs_scene_t *scene, obs_sceneitem_t *item,
|
||||
void *param)
|
||||
{
|
||||
if (obs_sceneitem_is_group(item))
|
||||
obs_sceneitem_group_enum_items(item, RotateSelectedSources,
|
||||
param);
|
||||
if (!obs_sceneitem_selected(item))
|
||||
return true;
|
||||
|
||||
|
@ -5601,10 +5604,11 @@ static bool RotateSelectedSources(obs_scene_t *scene, obs_sceneitem_t *item,
|
|||
else if (rot <= -360.0f) rot += 360.0f;
|
||||
obs_sceneitem_set_rot(item, rot);
|
||||
|
||||
obs_sceneitem_force_update_transform(item);
|
||||
|
||||
SetItemTL(item, tl);
|
||||
|
||||
UNUSED_PARAMETER(scene);
|
||||
UNUSED_PARAMETER(param);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -5631,6 +5635,9 @@ static bool MultiplySelectedItemScale(obs_scene_t *scene, obs_sceneitem_t *item,
|
|||
{
|
||||
vec2 &mul = *reinterpret_cast<vec2*>(param);
|
||||
|
||||
if (obs_sceneitem_is_group(item))
|
||||
obs_sceneitem_group_enum_items(item, MultiplySelectedItemScale,
|
||||
param);
|
||||
if (!obs_sceneitem_selected(item))
|
||||
return true;
|
||||
|
||||
|
@ -5641,6 +5648,8 @@ static bool MultiplySelectedItemScale(obs_scene_t *scene, obs_sceneitem_t *item,
|
|||
vec2_mul(&scale, &scale, &mul);
|
||||
obs_sceneitem_set_scale(item, &scale);
|
||||
|
||||
obs_sceneitem_force_update_transform(item);
|
||||
|
||||
SetItemTL(item, tl);
|
||||
|
||||
UNUSED_PARAMETER(scene);
|
||||
|
|
Loading…
Reference in a new issue