mirror of
https://github.com/Aitum/obs-aitum-multistream.git
synced 2024-11-22 02:12:40 +01:00
Fix edit vertical settings
This commit is contained in:
parent
25140bfd29
commit
71b0e6e123
@ -124,7 +124,6 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
|
||||
buttonLayout->addWidget(generalHelpButton, 0);
|
||||
buttonLayout->addWidget(generalSupportAitumButton, 0);
|
||||
|
||||
|
||||
buttonGroupBox->setLayout(buttonLayout);
|
||||
|
||||
generalPageLayout->addWidget(infoBox, 0);
|
||||
@ -375,7 +374,6 @@ OBSBasicSettings::OBSBasicSettings(QMainWindow *parent) : QDialog(parent)
|
||||
connect(generalHelpButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(listWidget->count() - 2); });
|
||||
|
||||
connect(generalSupportAitumButton, &QPushButton::clicked, [this] { listWidget->setCurrentRow(listWidget->count() - 1); });
|
||||
|
||||
}
|
||||
|
||||
OBSBasicSettings::~OBSBasicSettings()
|
||||
@ -499,10 +497,6 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting
|
||||
streaming_title->setStyleSheet(QString::fromUtf8("font-weight: bold;"));
|
||||
server_title_layout->addWidget(streaming_title, 1, Qt::AlignLeft);
|
||||
|
||||
// Config Button
|
||||
auto configButton = new QPushButton;
|
||||
configButton->setMinimumHeight(30);
|
||||
|
||||
// Advanced settings
|
||||
const bool advanced = obs_data_get_bool(settings, "advanced");
|
||||
auto advancedGroup = new QGroupBox(QString::fromUtf8(obs_module_text("AdvancedGroupHeader")));
|
||||
@ -898,6 +892,7 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting
|
||||
|
||||
// Reload
|
||||
LoadSettings(this->settings);
|
||||
LoadVerticalSettings(false);
|
||||
}
|
||||
|
||||
delete outputDialog;
|
||||
@ -917,14 +912,14 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting
|
||||
outputsLayout->addRow(serverGroup);
|
||||
}
|
||||
|
||||
void OBSBasicSettings::LoadVerticalSettings()
|
||||
void OBSBasicSettings::LoadVerticalSettings(bool load)
|
||||
{
|
||||
|
||||
while (verticalOutputsLayout->rowCount() > 1) {
|
||||
auto i = verticalOutputsLayout->takeRow(1).fieldItem;
|
||||
RemoveLayoutItem(i);
|
||||
verticalOutputsLayout->removeRow(1);
|
||||
}
|
||||
if (load) {
|
||||
auto ph = obs_get_proc_handler();
|
||||
struct calldata cd;
|
||||
calldata_init(&cd);
|
||||
@ -937,6 +932,8 @@ void OBSBasicSettings::LoadVerticalSettings()
|
||||
if (vertical_outputs)
|
||||
obs_data_array_release(vertical_outputs);
|
||||
vertical_outputs = (obs_data_array_t *)calldata_ptr(&cd, "outputs");
|
||||
calldata_free(&cd);
|
||||
}
|
||||
obs_data_array_enum(
|
||||
vertical_outputs,
|
||||
[](obs_data_t *data, void *param) {
|
||||
@ -944,7 +941,6 @@ void OBSBasicSettings::LoadVerticalSettings()
|
||||
d->AddServer(d->verticalOutputsLayout, data, d->vertical_outputs);
|
||||
},
|
||||
this);
|
||||
calldata_free(&cd);
|
||||
}
|
||||
|
||||
void OBSBasicSettings::SaveVerticalSettings()
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
~OBSBasicSettings();
|
||||
|
||||
void LoadSettings(obs_data_t *settings);
|
||||
void LoadVerticalSettings();
|
||||
void LoadVerticalSettings(bool load);
|
||||
void SaveVerticalSettings();
|
||||
void LoadOutputStats(std::vector<video_t *> *oldVideos);
|
||||
void SetNewerVersion(QString newer_version_available);
|
||||
|
@ -288,7 +288,7 @@ MultistreamDock::MultistreamDock(QWidget *parent) : QFrame(parent)
|
||||
if (current_config)
|
||||
obs_data_apply(settings, current_config);
|
||||
configDialog->LoadSettings(settings);
|
||||
configDialog->LoadVerticalSettings();
|
||||
configDialog->LoadVerticalSettings(true);
|
||||
configDialog->LoadOutputStats(&oldVideo);
|
||||
configDialog->SetNewerVersion(newer_version_available);
|
||||
configDialog->setResult(QDialog::Rejected);
|
||||
|
Loading…
Reference in New Issue
Block a user