From 74eb279dfd4228ddfaa38c6337e15490f168fc33 Mon Sep 17 00:00:00 2001 From: Samuel Woon Date: Sun, 27 Sep 2020 02:28:49 -0500 Subject: [PATCH] Show dialog on copy failure. By @samuel-w (#647) --- src/vorta/views/repo_tab.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vorta/views/repo_tab.py b/src/vorta/views/repo_tab.py index c168b3c7..6b13d98b 100644 --- a/src/vorta/views/repo_tab.py +++ b/src/vorta/views/repo_tab.py @@ -214,3 +214,9 @@ class RepoTab(RepoBase, RepoUI, BackupProfileMixin): if self.repoSelector.currentIndex() > 2: URL = self.repoSelector.currentText() QApplication.clipboard().setText(URL) + else: + msg = QMessageBox() + msg.setStandardButtons(QMessageBox.Ok) + msg.setParent(self, QtCore.Qt.Sheet) + msg.setText(self.tr("Select a repository from the dropdown first.")) + msg.exec_()