From 5b44781e3be68c5c6d7cbc6034e85111613eb36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 26 Dec 2019 18:01:52 -0500 Subject: Check if it's completed download --- hypervideo_gui/main_ui.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'hypervideo_gui/main_ui.py') diff --git a/hypervideo_gui/main_ui.py b/hypervideo_gui/main_ui.py index 1ed9d22..a676143 100644 --- a/hypervideo_gui/main_ui.py +++ b/hypervideo_gui/main_ui.py @@ -428,15 +428,14 @@ class MainWindow(QMainWindow): def msg_dl_finished(self): ''' Message finished download ''' - self.pbar.setValue(100) - - msg = QMessageBox() - msg.setWindowTitle('%s' % __title__) - msg.setText('Download done!') - msg.setIcon(QMessageBox.Information) - self.show() - - msg.exec_() + # Check if it's completed download + if self.pbar.value() == 100: + msg = QMessageBox() + msg.setWindowTitle('%s' % __title__) + msg.setIcon(QMessageBox.Information) + msg.setText('Download done!') + self.show() + msg.exec_() def cancel_download(self): ''' Cancel download''' -- cgit v1.2.3