From e10d475b495f7d3e01c74e0cb8677d752dc9e808 Mon Sep 17 00:00:00 2001 From: Pourliver Date: Wed, 19 Jun 2019 14:21:30 -0400 Subject: [PATCH] Allow the player to open multiple replay files at once (cherry picked from commit da1ae9b9dfff933939fc17201cc6c7d3525e0a2e) --- pyrdp/player/MainWindow.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyrdp/player/MainWindow.py b/pyrdp/player/MainWindow.py index f0341fd9c..b106b220c 100644 --- a/pyrdp/player/MainWindow.py +++ b/pyrdp/player/MainWindow.py @@ -72,11 +72,13 @@ def __init__(self, bind_address: str, port: int, filesToRead: [str]): self.replayWindow.openFile(fileName) def onOpenFile(self): - fileName, _ = QFileDialog.getOpenFileName(self, "Open File") + fileNames, _ = QFileDialog.getOpenFileNames(self, "Open File(s)") - if fileName: + if fileNames: self.tabManager.setCurrentWidget(self.replayWindow) - self.replayWindow.openFile(fileName) + for fileName in fileNames: + self.replayWindow.openFile(fileName) + def sendKeySequence(self, keys: [Qt.Key]): if self.tabManager.currentWidget() is self.liveWindow: