Opening a zero-photo project when "Sort by" is set to "time of import" causes a crash
Probably connected to #205 (closed).
- Start in debug mode.
- Open a project with some photos (tested on two, but one might be enough).
- Set "Sort by" to "time of import".
- Open a project with no photos. Program crashes:
Traceback (most recent call last):
File "D:\work\arthropods\arthropoddescriber2repository\arthropod_describer_py\maphis\app.py", line 941, in handle_current_changed
photo = self.storage.get_photo_by_idx(row)
File "D:\work\arthropods\arthropoddescriber2repository\arthropod_describer_py\maphis\common\local_storage.py", line 156, in get_photo_by_idx
photo = self._images[idx]
IndexError: list index out of range
Process finished with exit code 1