diff --git a/forms/advanced-scene-switcher.ui b/forms/advanced-scene-switcher.ui
index b40f4708..ecf479ea 100644
--- a/forms/advanced-scene-switcher.ui
+++ b/forms/advanced-scene-switcher.ui
@@ -1679,7 +1679,7 @@
Region
-
+
-
-
@@ -1879,7 +1879,7 @@
- true
+ false
@@ -1917,6 +1917,91 @@
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/up.svg../../../forms/images/up.svg
+
+
+ true
+
+
+ upArrowIconSmall
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/down.svg../../../forms/images/down.svg
+
+
+ true
+
+
+ downArrowIconSmall
+
+
+
-
@@ -1938,7 +2023,7 @@
Media
-
+
-
-
@@ -2039,15 +2124,12 @@
true
- true
+ false
-
-
- 4
-
-
@@ -2080,6 +2162,91 @@
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/up.svg../../../forms/images/up.svg
+
+
+ true
+
+
+ upArrowIconSmall
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/down.svg../../../forms/images/down.svg
+
+
+ true
+
+
+ downArrowIconSmall
+
+
+
-
@@ -2372,6 +2539,91 @@
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/up.svg../../../forms/images/up.svg
+
+
+ true
+
+
+ upArrowIconSmall
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/down.svg../../../forms/images/down.svg
+
+
+ true
+
+
+ downArrowIconSmall
+
+
+
-
@@ -2613,10 +2865,7 @@
-
-
-
- 4
-
+
-
@@ -2981,15 +3230,12 @@
- true
+ false
-
-
- 4
-
-
@@ -3022,6 +3268,91 @@
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/up.svg../../../forms/images/up.svg
+
+
+ true
+
+
+ upArrowIconSmall
+
+
+
+ -
+
+
+
+ 22
+ 22
+
+
+
+
+
+
+
+ ../../../forms/images/down.svg../../../forms/images/down.svg
+
+
+ true
+
+
+ downArrowIconSmall
+
+
+
-
diff --git a/src/file-switch.cpp b/src/file-switch.cpp
index 096d7077..0e0a4cd5 100644
--- a/src/file-switch.cpp
+++ b/src/file-switch.cpp
@@ -332,6 +332,36 @@ void SceneSwitcher::on_fileScenesList_currentRowChanged(int idx)
ui->fileContentTimeCheckBox->setChecked(s.useTime);
}
+void SceneSwitcher::on_fileUp_clicked()
+{
+ int index = ui->fileScenesList->currentRow();
+ if (index != -1 && index != 0) {
+ ui->fileScenesList->insertItem(
+ index - 1, ui->fileScenesList->takeItem(index));
+ ui->fileScenesList->setCurrentRow(index - 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->fileSwitches.begin() + index,
+ switcher->fileSwitches.begin() + index - 1);
+ }
+}
+
+void SceneSwitcher::on_fileDown_clicked()
+{
+ int index = ui->fileScenesList->currentRow();
+ if (index != -1 && index != ui->fileScenesList->count() - 1) {
+ ui->fileScenesList->insertItem(
+ index + 1, ui->fileScenesList->takeItem(index));
+ ui->fileScenesList->setCurrentRow(index + 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->fileSwitches.begin() + index,
+ switcher->fileSwitches.begin() + index + 1);
+ }
+}
+
void SwitcherData::saveFileSwitches(obs_data_t *obj)
{
obs_data_array_t *fileArray = obs_data_array_create();
diff --git a/src/headers/advanced-scene-switcher.hpp b/src/headers/advanced-scene-switcher.hpp
index 05777e7c..3d2717b9 100644
--- a/src/headers/advanced-scene-switcher.hpp
+++ b/src/headers/advanced-scene-switcher.hpp
@@ -68,6 +68,8 @@ public slots:
void on_screenRegions_currentRowChanged(int idx);
void on_screenRegionAdd_clicked();
void on_screenRegionRemove_clicked();
+ void on_screenRegionUp_clicked();
+ void on_screenRegionDown_clicked();
void on_pauseScenes_currentRowChanged(int idx);
void on_pauseScenesAdd_clicked();
@@ -86,6 +88,8 @@ public slots:
void on_sceneRoundTripRemove_clicked();
void on_sceneRoundTripSave_clicked();
void on_sceneRoundTripLoad_clicked();
+ void on_sceneRoundTripUp_clicked();
+ void on_sceneRoundTripDown_clicked();
void on_autoStopSceneCheckBox_stateChanged(int state);
void on_autoStopScenes_currentTextChanged(const QString &text);
@@ -131,10 +135,14 @@ public slots:
void on_fileRemove_clicked();
void on_fileScenesList_currentRowChanged(int idx);
void on_browseButton_3_clicked();
+ void on_fileUp_clicked();
+ void on_fileDown_clicked();
void on_mediaSwitches_currentRowChanged(int idx);
void on_mediaAdd_clicked();
void on_mediaRemove_clicked();
+ void on_mediaUp_clicked();
+ void on_mediaDown_clicked();
void on_timeSwitches_currentRowChanged(int idx);
void on_timeAdd_clicked();
diff --git a/src/media-switch.cpp b/src/media-switch.cpp
index 0bf891e3..1838c3cf 100644
--- a/src/media-switch.cpp
+++ b/src/media-switch.cpp
@@ -92,6 +92,36 @@ void SceneSwitcher::on_mediaRemove_clicked()
delete item;
}
+void SceneSwitcher::on_mediaUp_clicked()
+{
+ int index = ui->mediaSwitches->currentRow();
+ if (index != -1 && index != 0) {
+ ui->mediaSwitches->insertItem(
+ index - 1, ui->mediaSwitches->takeItem(index));
+ ui->mediaSwitches->setCurrentRow(index - 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->mediaSwitches.begin() + index,
+ switcher->mediaSwitches.begin() + index - 1);
+ }
+}
+
+void SceneSwitcher::on_mediaDown_clicked()
+{
+ int index = ui->mediaSwitches->currentRow();
+ if (index != -1 && index != ui->mediaSwitches->count() - 1) {
+ ui->mediaSwitches->insertItem(
+ index + 1, ui->mediaSwitches->takeItem(index));
+ ui->mediaSwitches->setCurrentRow(index + 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->mediaSwitches.begin() + index,
+ switcher->mediaSwitches.begin() + index + 1);
+ }
+}
+
void SwitcherData::checkMediaSwitch(bool &match, OBSWeakSource &scene,
OBSWeakSource &transition)
{
diff --git a/src/scene-round-trip.cpp b/src/scene-round-trip.cpp
index 93340e8b..41b6c156 100644
--- a/src/scene-round-trip.cpp
+++ b/src/scene-round-trip.cpp
@@ -280,6 +280,36 @@ int SceneSwitcher::SceneRoundTripFindByData(const QString &scene1)
return idx;
}
+void SceneSwitcher::on_sceneRoundTripUp_clicked()
+{
+ int index = ui->sceneRoundTrips->currentRow();
+ if (index != -1 && index != 0) {
+ ui->sceneRoundTrips->insertItem(
+ index - 1, ui->sceneRoundTrips->takeItem(index));
+ ui->sceneRoundTrips->setCurrentRow(index - 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->sceneRoundTripSwitches.begin() + index,
+ switcher->sceneRoundTripSwitches.begin() + index - 1);
+ }
+}
+
+void SceneSwitcher::on_sceneRoundTripDown_clicked()
+{
+ int index = ui->sceneRoundTrips->currentRow();
+ if (index != -1 && index != ui->sceneRoundTrips->count() - 1) {
+ ui->sceneRoundTrips->insertItem(
+ index + 1, ui->sceneRoundTrips->takeItem(index));
+ ui->sceneRoundTrips->setCurrentRow(index + 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->sceneRoundTripSwitches.begin() + index,
+ switcher->sceneRoundTripSwitches.begin() + index + 1);
+ }
+}
+
void SwitcherData::saveSceneRoundTripSwitches(obs_data_t *obj)
{
obs_data_array_t *sceneRoundTripArray = obs_data_array_create();
diff --git a/src/screen-region-switch.cpp b/src/screen-region-switch.cpp
index d39fafe3..88e6f70d 100644
--- a/src/screen-region-switch.cpp
+++ b/src/screen-region-switch.cpp
@@ -18,7 +18,7 @@ void SwitcherData::checkScreenRegionSwitch(bool &match, OBSWeakSource &scene,
if (verbose)
blog(LOG_INFO,
- "Advanced Scene Switcher region match");
+ "Advanced Scene Switcher region match");
break;
}
@@ -162,6 +162,36 @@ int SceneSwitcher::ScreenRegionFindByData(const QString ®ion)
return idx;
}
+void SceneSwitcher::on_screenRegionUp_clicked()
+{
+ int index = ui->screenRegions->currentRow();
+ if (index != -1 && index != 0) {
+ ui->screenRegions->insertItem(
+ index - 1, ui->screenRegions->takeItem(index));
+ ui->screenRegions->setCurrentRow(index - 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->screenRegionSwitches.begin() + index,
+ switcher->screenRegionSwitches.begin() + index - 1);
+ }
+}
+
+void SceneSwitcher::on_screenRegionDown_clicked()
+{
+ int index = ui->screenRegions->currentRow();
+ if (index != -1 && index != ui->screenRegions->count() - 1) {
+ ui->screenRegions->insertItem(
+ index + 1, ui->screenRegions->takeItem(index));
+ ui->screenRegions->setCurrentRow(index + 1);
+
+ std::lock_guard lock(switcher->m);
+
+ iter_swap(switcher->screenRegionSwitches.begin() + index,
+ switcher->screenRegionSwitches.begin() + index + 1);
+ }
+}
+
void SwitcherData::saveScreenRegionSwitches(obs_data_t *obj)
{
obs_data_array_t *screenRegionArray = obs_data_array_create();