mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Reset crop with transform
This commit is contained in:
parent
27310f8b2c
commit
3231b29cec
|
@ -3714,6 +3714,8 @@ void OBSBasic::on_actionResetTransform_triggered()
|
|||
if (!obs_sceneitem_selected(item))
|
||||
return true;
|
||||
|
||||
obs_sceneitem_defer_update_begin(item);
|
||||
|
||||
obs_transform_info info;
|
||||
vec2_set(&info.pos, 0.0f, 0.0f);
|
||||
vec2_set(&info.scale, 1.0f, 1.0f);
|
||||
|
@ -3724,6 +3726,11 @@ void OBSBasic::on_actionResetTransform_triggered()
|
|||
vec2_set(&info.bounds, 0.0f, 0.0f);
|
||||
obs_sceneitem_set_info(item, &info);
|
||||
|
||||
obs_sceneitem_crop crop = {};
|
||||
obs_sceneitem_set_crop(item, &crop);
|
||||
|
||||
obs_sceneitem_defer_update_end(item);
|
||||
|
||||
UNUSED_PARAMETER(scene);
|
||||
UNUSED_PARAMETER(param);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue