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:
parent
3b3933b42f
commit
883f9f204b
5 changed files with 23 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue