Queue reordering bug fixed

It’s been a while since I’ve actually changed Filmulator, because it’s been working fine in day-to-day use for me (and my needs drive development) but yesterday, I finally noticed and nailed down a bug that had eluded me for a while.

After reordering photos in the queue, when the queue gets refreshed (such as by editing an image that hadn’t been changed before, revealing the orange bar beneath the image), the images would shuffle around.

It turns out that in the queue, the view delegates are persistent and always read the same model index, even when they are shuffled. However, after dropping the image, I would change the queue’s indices in the database so that on closing and restarting, the order is preserved, and that would cause the data to move around, unbeknownst to the delegates.

It was a simple fix: simply store a separate display order index, and don’t touch the primary index (which things get sorted by). On startup, the display order index gets copied over to the primary index, and thus the queue order is preserved across sessions.

2 Likes