labelImg
labelImg copied to clipboard
Deleting an image resets the file list without going to next image [suggested fix included]
In the latest version, when I delete an image, it resets my selection back to the first image.
This change seems to work:
def delete_image(self):
delete_path = self.file_path
if delete_path is not None:
idx = self.cur_img_idx
if os.path.exists(delete_path):
os.remove(delete_path)
self.import_dir_images(self.last_open_dir)
self.cur_img_idx = idx
self.cur_img_idx -= 1
self.open_next_image()
Many tanks for your time, the current behavior is really annoying.
def delete_image(self):
delete_path = self.file_path
if delete_path is not None:
idx = self.cur_img_idx
if os.path.exists(delete_path):
os.remove(delete_path)
self.import_dir_images(self.last_open_dir)
self.cur_img_idx = idx
self.cur_img_idx -= 1
self.open_next_image()
Observed behavior
When deleting an image the selection in the image list jumps back to the first image.
Expected behavior
When deleting an image the selection in the image list should remain on the same position.
Steps to reproduce
- Load a directory containing some images, e.g. 10.
- Navigate to the fourth image, i.e. by pressing 'd' shortcut four times.
- Delete the current image, i.e. by pressing CTRL+SHIFT+d.
- Observe that the first image is selected, and not the expected fourth image.
@levipereira, @CrucialDrew please check the bugfix introduced with #861 and add the results here - thanks!
Is this repo still under maintenance?