Skip to content

Commit fcba797

Browse files
committed
Handle case where image index is not saved in settings
1 parent e0f51e6 commit fcba797

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

image-tagging-gui/widgets/main_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def clear_image_list_filter(self):
223223
self.all_tags_editor.all_tags_list.setCurrentIndex(QModelIndex())
224224
self.proxy_image_list_model.setFilterRegularExpression('')
225225
# Select the previously selected image in the unfiltered image list.
226-
select_index = int(self.settings.value('image_index'))
226+
select_index = int(self.settings.value('image_index') or 0)
227227
self.image_list.list_view.setCurrentIndex(
228228
self.proxy_image_list_model.index(select_index, 0))
229229

0 commit comments

Comments
 (0)