mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-02 13:27:14 -05:00
UI: Add reset/close buttons to transform dialog
Adds a reset and close button to the transform dialog. Closes jp9000/obs-studio#612
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <QMessageBox>
|
||||
#include "window-basic-transform.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
|
||||
@@ -55,6 +56,11 @@ OBSBasicTransform::OBSBasicTransform(OBSBasic *parent)
|
||||
HookWidget(ui->cropTop, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
||||
HookWidget(ui->cropBottom, ISCROLL_CHANGED, SLOT(OnCropChanged()));
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset),
|
||||
SIGNAL(clicked()), this, SLOT(on_resetButton_clicked()));
|
||||
connect(ui->buttonBox,
|
||||
SIGNAL(rejected()), this, SLOT(close()));
|
||||
|
||||
installEventFilter(CreateShortcutFilter());
|
||||
|
||||
OBSScene curScene = main->GetCurrentScene();
|
||||
@@ -288,3 +294,8 @@ void OBSBasicTransform::OnCropChanged()
|
||||
obs_sceneitem_set_crop(item, &crop);
|
||||
ignoreTransformSignal = false;
|
||||
}
|
||||
|
||||
void OBSBasicTransform::on_resetButton_clicked()
|
||||
{
|
||||
main->on_actionResetTransform_triggered();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user