mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-28 12:55:28 -05:00
Remove switcher-data dependency from scene-selection
This commit is contained in:
parent
a86ff4f1f0
commit
07d397bdac
|
|
@ -12,6 +12,11 @@ namespace advss {
|
|||
static QMetaObject::Connection addPulse;
|
||||
SceneGroupEditWidget *typeEdit = nullptr;
|
||||
|
||||
std::deque<SceneGroup> &GetSceneGroups()
|
||||
{
|
||||
return switcher->sceneGroups;
|
||||
}
|
||||
|
||||
void SceneGroup::advanceIdx()
|
||||
{
|
||||
currentIdx++;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
|
|
@ -87,5 +87,6 @@ private:
|
|||
|
||||
SceneGroup *GetSceneGroupByName(const char *name);
|
||||
SceneGroup *GetSceneGroupByQString(const QString &name);
|
||||
std::deque<SceneGroup> &GetSceneGroups();
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "scene-selection.hpp"
|
||||
#include "switcher-data.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "scene-group.hpp"
|
||||
#include "scene-switch-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
|
@ -108,9 +110,9 @@ OBSWeakSource SceneSelection::GetScene(bool advance) const
|
|||
}
|
||||
return _group->getCurrentScene();
|
||||
case Type::PREVIOUS:
|
||||
return switcher->previousScene;
|
||||
return GetPreviousScene();
|
||||
case Type::CURRENT:
|
||||
return switcher->currentScene;
|
||||
return GetCurrentScene();
|
||||
case Type::PREVIEW: {
|
||||
auto s = obs_frontend_get_current_preview_scene();
|
||||
auto scene = obs_source_get_weak_source(s);
|
||||
|
|
@ -237,7 +239,7 @@ static QStringList getScenesList()
|
|||
static QStringList getSceneGroupsList()
|
||||
{
|
||||
QStringList list;
|
||||
for (const auto &sg : switcher->sceneGroups) {
|
||||
for (const auto &sg : GetSceneGroups()) {
|
||||
list << QString::fromStdString(sg.name);
|
||||
}
|
||||
list.sort();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user