mirror of
https://github.com/borgbase/vorta
synced 2025-03-09 21:57:52 +00:00
Make sure correct sources are removed (#1110)
This commit is contained in:
parent
09fe3aa5b8
commit
5b769b104f
1 changed files with 5 additions and 1 deletions
|
@ -176,11 +176,15 @@ class SourceTab(SourceBase, SourceUI, BackupProfileMixin):
|
|||
|
||||
def source_remove(self):
|
||||
indexes = self.sourceFilesWidget.selectionModel().selectedRows()
|
||||
profile = self.profile()
|
||||
# sort indexes, starting with lowest
|
||||
indexes.sort()
|
||||
# remove each selected row, starting with highest index (otherways, higher indexes become invalid)
|
||||
for index in reversed(indexes):
|
||||
db_item = SourceFileModel.get(dir=self.sourceFilesWidget.item(index.row(), SourceColumn.Path).text())
|
||||
db_item = SourceFileModel.get(
|
||||
dir=self.sourceFilesWidget.item(index.row(), SourceColumn.Path).text(),
|
||||
profile=profile
|
||||
)
|
||||
db_item.delete_instance()
|
||||
self.sourceFilesWidget.removeRow(index.row())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue