Fixed threading issue when importing images

Don't deselect items from within the import worker thread.
This commit is contained in:
Rebecca Breu 2024-03-29 22:50:49 +01:00
parent b2c8b867f2
commit b025204dfb
3 changed files with 5 additions and 1 deletions

View file

@ -25,6 +25,8 @@ Fixed
* Removed black line under marching ants outline of crop mode, which
would scale with the image and get potentially very thick.
* Fixed a crash when importing images with unsupported exif orientation info
* Fixed threading issue when importing images (causing potential
hangs/weird behaviour)

View file

@ -26,10 +26,11 @@ class InsertItems(QtGui.QUndoCommand):
self.ignore_first_redo = ignore_first_redo
def redo(self):
self.scene.deselect_all_items()
if self.ignore_first_redo:
self.ignore_first_redo = False
return
self.scene.deselect_all_items()
if self.position:
self.old_positions = []
rect = self.scene.itemsBoundingRect(items=self.items)

View file

@ -540,6 +540,7 @@ class BeeGraphicsView(MainControlsMixin,
def do_insert_images(self, filenames, pos=None):
if not pos:
pos = self.get_view_center()
self.scene.deselect_all_items()
self.undo_stack.beginMacro('Insert Images')
self.worker = fileio.ThreadedIO(
fileio.load_images,