On Sun, Jun 14, 2015 at 02:35:10PM -1000, Linus Torvalds wrote: > Which shows that renumbering selected dives got completely broken at > some point. Tomaz? > > It does in fact renumber the selected dives, it's just that the > renumbering starts from the first shown dive. Which is the most recent > one. Which is *not* how dive numbering works. It's the *oldest* > selected dive we should start the renumbering from. > > I think this used to work (just select a few dives, do the "renumber" > thing from the menu, and give the starting number). I don't know when > it broke, because I have not tried to do this in a long time.
Hmm. This is very odd. I tried a few different ways to reproduce this and whatever I try things work just fine. So I look at the code and it turns out that this could be an implementation dependent "feature". So Grace's code stores the dives that get renumbered in a QMap together with their original dive number and remembers the new starting number. For my version of Qt it happens that the the foreach over that QMap runs through the dives in the correct order. I'm guessing that the version of Qt that you linked against on your system runs through the QMap backwards. Out of curiosity, which version of Qt do you have? You're running Fedora 22, right? I changed the code to simply remember both the old and the new number for each dive - but of course since I can't reproduce the bug it's hard for me to test if my fix is correct... Can you test the latest master and let me know? /D _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
