Selaa lähdekoodia

Merge pull request #1497 from cg2121/fix-autoremux-warning

UI: Fix auto remux warning
Jim 7 vuotta sitten
vanhempi
sitoutus
94e44e698e
2 muutettua tiedostoa jossa 9 lisäystä ja 3 poistoa
  1. 7 3
      UI/window-remux.cpp
  2. 2 0
      UI/window-remux.hpp

+ 7 - 3
UI/window-remux.cpp

@@ -577,8 +577,11 @@ void RemuxQueueModel::endProcessing()
 	}
 
 	// Signal that the insertion point exists again.
-	beginInsertRows(QModelIndex(), queue.length(), queue.length());
-	endInsertRows();
+
+	if (!autoRemux) {
+		beginInsertRows(QModelIndex(), queue.length(), queue.length());
+		endInsertRows();
+	}
 
 	isProcessing = false;
 
@@ -821,7 +824,7 @@ void OBSRemux::dropEvent(QDropEvent *ev)
 		QMessageBox::information(nullptr,
 				QTStr("Remux.NoFilesAddedTitle"),
 				QTStr("Remux.NoFilesAdded"), QMessageBox::Ok);
-	} else {
+	} else if (!autoRemux) {
 		QModelIndex insertIndex = queueModel->index(
 				queueModel->rowCount() - 1,
 				RemuxEntryColumn::InputPath);
@@ -889,6 +892,7 @@ void OBSRemux::remuxNextEntry()
 	if (queueModel->beginNextEntry(inputPath, outputPath)) {
 		emit remux(inputPath, outputPath);
 	} else {
+		queueModel->autoRemux = autoRemux;
 		queueModel->endProcessing();
 
 		if (!autoRemux) {

+ 2 - 0
UI/window-remux.hpp

@@ -118,6 +118,8 @@ public:
 	void clearFinished();
 	void clearAll();
 
+	bool autoRemux = false;
+
 private:
 	struct RemuxQueueEntry
 	{