Adjust widgets to screen size

Delete key for the library
This commit is contained in:
BasioMeusPuga
2018-03-21 15:28:58 +05:30
parent a1dba753e8
commit c783e44444
3 changed files with 20 additions and 10 deletions

View File

@@ -296,8 +296,6 @@ class Library:
# All files in unselected directories will have to be removed
# from both of the models
# They will also have to be deleted from the library
# valid_paths = set(valid_paths)
invalid_paths = []
deletable_persistent_indexes = []
@@ -306,7 +304,11 @@ class Library:
item_metadata = item.data(QtCore.Qt.UserRole + 3)
book_path = item_metadata['path']
addition_mode = item_metadata['addition_mode']
try:
addition_mode = item_metadata['addition_mode']
except KeyError:
addition_mode = 'automatic'
print('Libary: Error setting addition mode for prune')
if (book_path not in valid_paths and
(addition_mode != 'manual' or addition_mode is None)):