1
0
Эх сурвалжийг харах

UI: Fix issue where multiview doesn't update

Clayton Groeneveld 6 жил өмнө
parent
commit
016d4ee87f

+ 18 - 0
UI/window-basic-main.cpp

@@ -392,6 +392,12 @@ OBSBasic::OBSBasic(QWidget *parent)
 		SLOT(PreviewDisabledMenu(const QPoint &)));
 	connect(ui->enablePreviewButton, SIGNAL(clicked()), this,
 		SLOT(TogglePreview()));
+
+	connect(ui->scenes->model(),
+		SIGNAL(rowsMoved(QModelIndex, int, int, QModelIndex, int)),
+		this,
+		SLOT(ScenesReordered(const QModelIndex &, int, int,
+				     const QModelIndex &, int)));
 }
 
 static void SaveAudioDevice(const char *name, int channel, obs_data_t *parent,
@@ -7604,3 +7610,15 @@ void OBSBasic::CheckDiskSpaceRemaining()
 		DiskSpaceMessage();
 	}
 }
+
+void OBSBasic::ScenesReordered(const QModelIndex &parent, int start, int end,
+			       const QModelIndex &destination, int row)
+{
+	UNUSED_PARAMETER(parent);
+	UNUSED_PARAMETER(start);
+	UNUSED_PARAMETER(end);
+	UNUSED_PARAMETER(destination);
+	UNUSED_PARAMETER(row);
+
+	OBSProjector::UpdateMultiviewProjectors();
+}

+ 3 - 0
UI/window-basic-main.hpp

@@ -560,6 +560,9 @@ private slots:
 
 	void CheckDiskSpaceRemaining();
 
+	void ScenesReordered(const QModelIndex &parent, int start, int end,
+			     const QModelIndex &destination, int row);
+
 private:
 	/* OBS Callbacks */
 	static void SceneReordered(void *data, calldata_t *params);