diff --git a/CHANGELOG b/CHANGELOG index ac4e579..b603f1b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +v0.10.1 - ??? + BUG FIXES + + Fix a bug where an error in thumbnail generation could result in + thumbnail generation not working for the rest of the application + lifetime. + v0.10.0 - June 03, 2020 BREAKING CHANGES + Drop support for Python 2. diff --git a/mirage/__init__.py b/mirage/__init__.py index 13700cf..0d7604b 100755 --- a/mirage/__init__.py +++ b/mirage/__init__.py @@ -776,35 +776,31 @@ with self.thumbpane_stop_updating_lock: self.thumbpane_stop_updating[thread_id] = False - if not self.thumbpane_update_lock.acquire(): - return - - self.thumbpane_create_dir() - # Check to see if any images need their thumbnails generated. - curr_coord = 0 - imgnum = 0 - - for imgnum in range(start, end + 1): - if ( - self.thumbpane_stop_updating.get(thread_id) - or self.closing_app - or self.stop_now - or not self.thumbpane_show - ): - break - - if imgnum >= len(self.image_list): - break - - self.thumbpane_set_image(self.image_list[imgnum], imgnum) - - if select_image == imgnum and select_image == self.curr_img_in_list: - GLib.idle_add(self.thumbpane_select, select_image) - - with self.thumbpane_stop_updating_lock: - del self.thumbpane_stop_updating[thread_id] - - self.thumbpane_update_lock.release() + with self.thumbpane_update_lock: + self.thumbpane_create_dir() + # Check to see if any images need their thumbnails generated. + curr_coord = 0 + imgnum = 0 + + for imgnum in range(start, end + 1): + if ( + self.thumbpane_stop_updating.get(thread_id) + or self.closing_app + or self.stop_now + or not self.thumbpane_show + ): + break + + if imgnum >= len(self.image_list): + break + + self.thumbpane_set_image(self.image_list[imgnum], imgnum) + + if select_image == imgnum and select_image == self.curr_img_in_list: + GLib.idle_add(self.thumbpane_select, select_image) + + with self.thumbpane_stop_updating_lock: + del self.thumbpane_stop_updating[thread_id] def thumbpane_clear_list(self): self.thumbpane_bottom_coord_loaded = 0