mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Disable Copy Filters in scene list for scene with no filters
When you right-click on a source in the Sources list that does not have any filters, the "Copy Filters" item is disabled. When you right-click on a scene in the Scenes list that does not have any filters, the "Copy Filters" item is enabled. This fixes the Scenes context menu to behave like the Sources context menu.
This commit is contained in:
parent
efb2dc70b9
commit
5517db5122
|
@ -4729,6 +4729,10 @@ void OBSBasic::on_scenes_customContextMenuRequested(const QPoint &pos)
|
|||
SLOT(on_actionAddScene_triggered()));
|
||||
|
||||
if (item) {
|
||||
QAction *copyFilters = new QAction(QTStr("Copy.Filters"), this);
|
||||
copyFilters->setEnabled(false);
|
||||
connect(copyFilters, SIGNAL(triggered()), this,
|
||||
SLOT(SceneCopyFilters()));
|
||||
QAction *pasteFilters =
|
||||
new QAction(QTStr("Paste.Filters"), this);
|
||||
pasteFilters->setEnabled(copyFiltersString);
|
||||
|
@ -4738,8 +4742,7 @@ void OBSBasic::on_scenes_customContextMenuRequested(const QPoint &pos)
|
|||
popup.addSeparator();
|
||||
popup.addAction(QTStr("Duplicate"), this,
|
||||
SLOT(DuplicateSelectedScene()));
|
||||
popup.addAction(QTStr("Copy.Filters"), this,
|
||||
SLOT(SceneCopyFilters()));
|
||||
popup.addAction(copyFilters);
|
||||
popup.addAction(pasteFilters);
|
||||
popup.addSeparator();
|
||||
popup.addAction(QTStr("Rename"), this, SLOT(EditSceneName()));
|
||||
|
@ -4806,6 +4809,8 @@ void OBSBasic::on_scenes_customContextMenuRequested(const QPoint &pos)
|
|||
|
||||
connect(multiviewAction, &QAction::triggered,
|
||||
std::bind(showInMultiview, data));
|
||||
|
||||
copyFilters->setEnabled(obs_source_filter_count(source) > 0);
|
||||
}
|
||||
|
||||
popup.addSeparator();
|
||||
|
|
Loading…
Reference in a new issue