UI: Handle update_properties signal in OBSBasicFilters window
The OBSBasicFilters window did not register a handler for the "update_properties" signal. Now it does. Addresses issue #1028. Closes jp9000/obs-studio#1036
This commit is contained in:
parent
350e7a7612
commit
953af9f3d1
@ -158,6 +158,7 @@ inline OBSSource OBSBasicFilters::GetFilter(int row, bool async)
|
||||
void OBSBasicFilters::UpdatePropertiesView(int row, bool async)
|
||||
{
|
||||
if (view) {
|
||||
updatePropertiesSignal.Disconnect();
|
||||
ui->rightLayout->removeWidget(view);
|
||||
view->deleteLater();
|
||||
view = nullptr;
|
||||
@ -173,6 +174,11 @@ void OBSBasicFilters::UpdatePropertiesView(int row, bool async)
|
||||
(PropertiesReloadCallback)obs_source_properties,
|
||||
(PropertiesUpdateCallback)obs_source_update);
|
||||
|
||||
updatePropertiesSignal.Connect(obs_source_get_signal_handler(filter),
|
||||
"update_properties",
|
||||
OBSBasicFilters::UpdateProperties,
|
||||
this);
|
||||
|
||||
obs_data_release(settings);
|
||||
|
||||
view->setMaximumHeight(250);
|
||||
@ -181,6 +187,12 @@ void OBSBasicFilters::UpdatePropertiesView(int row, bool async)
|
||||
view->show();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::UpdateProperties(void *data, calldata_t *)
|
||||
{
|
||||
QMetaObject::invokeMethod(static_cast<OBSBasicFilters*>(data)->view,
|
||||
"ReloadProperties");
|
||||
}
|
||||
|
||||
void OBSBasicFilters::AddFilter(OBSSource filter)
|
||||
{
|
||||
uint32_t flags = obs_source_get_output_flags(filter);
|
||||
|
@ -45,6 +45,7 @@ private:
|
||||
|
||||
OBSSignal removeSourceSignal;
|
||||
OBSSignal renameSourceSignal;
|
||||
OBSSignal updatePropertiesSignal;
|
||||
|
||||
inline OBSSource GetFilter(int row, bool async);
|
||||
|
||||
@ -56,6 +57,7 @@ private:
|
||||
static void OBSSourceReordered(void *param, calldata_t *data);
|
||||
static void SourceRemoved(void *param, calldata_t *data);
|
||||
static void SourceRenamed(void *param, calldata_t *data);
|
||||
static void UpdateProperties(void *data, calldata_t *params);
|
||||
static void DrawPreview(void *data, uint32_t cx, uint32_t cy);
|
||||
|
||||
QMenu *CreateAddFilterPopupMenu(bool async);
|
||||
|
Loading…
x
Reference in New Issue
Block a user