View Single Post
Old 08-11-2026, 12:53 PM   #72
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,947
Karma: 7500000
Join Date: Nov 2009
Device: many
Okay, this should now be fixed in master.

As it happens Qt's selection ranges are supposed to use QPersistentIndexes (which means that the Indexes (pseudo pointers) to those ranges are supposed to be automatically updated whenever rows are moved.

Unfortuately, instead of updating, for a move right of the type you described, Qt just invalidated the range (which is what caused the crash as I did not know that a range of an array could have a top row of -1 and bottom row of -1! ie. be invalid).

So to prevent this incorrect invalidation, Sigil must move right any child BEFORE their original parent or original grandparents are moved.

So that is what I just did. Move rights of the type you described, now no longer crash and seem to work.

I have pushed this change to master.

Nice job tracking down that bug and figuring out how to recreate it!

Thank you for all your testing and feedback.
KevinH is online now   Reply With Quote