|
@@ -301,6 +301,17 @@ void OBSBasicProperties::UpdateProperties(void *data, calldata_t *)
|
|
|
"ReloadProperties");
|
|
|
}
|
|
|
|
|
|
+static bool ConfirmReset(QWidget *parent)
|
|
|
+{
|
|
|
+ QMessageBox::StandardButton button;
|
|
|
+
|
|
|
+ button = OBSMessageBox::question(parent, QTStr("ConfirmReset.Title"),
|
|
|
+ QTStr("ConfirmReset.Text"),
|
|
|
+ QMessageBox::Yes | QMessageBox::No);
|
|
|
+
|
|
|
+ return button == QMessageBox::Yes;
|
|
|
+}
|
|
|
+
|
|
|
void OBSBasicProperties::on_buttonBox_clicked(QAbstractButton *button)
|
|
|
{
|
|
|
QDialogButtonBox::ButtonRole val = ui->buttonBox->buttonRole(button);
|
|
@@ -362,6 +373,9 @@ void OBSBasicProperties::on_buttonBox_clicked(QAbstractButton *button)
|
|
|
close();
|
|
|
|
|
|
} else if (val == QDialogButtonBox::ResetRole) {
|
|
|
+ if (!ConfirmReset(this))
|
|
|
+ return;
|
|
|
+
|
|
|
OBSDataAutoRelease settings = obs_source_get_settings(source);
|
|
|
obs_data_clear(settings);
|
|
|
|