Qt branch updates

Dirk Hohndel dirk at hohndel.org
Sat May 11 23:08:44 PDT 2013


I fixed a couple small bugs, but the big thing I worked on was selection
change with cursor up / cursor down. Tomaz was kind enough to give me a
good idea of the Qt magic that I needed to do that before heading into a
well deserved weekend of no hacking. I took our slightly unusual
selection logic and tried to implement it in Qt.

Dear Qt hackers - trust me, the logic makes sense :-)

(which is much more than what I can say about my commit message - but I
had pushed this out before I realized that I had forgotten to flesh that
out... oops).

The commit implements two things that are related but might have better
be done in two commits:

a) it adds magic handling to our existing selection logic. Basically
when you select a trip, you select all the dives in a trip. Unless you
select a range of dives that happen to include the header of a partial
trip (so you either do drag-select or shift-select of a range that
includes a trip entry but not all the dives in that trip). In that case
we mark the trip header as selected (mostly for visual consistency), but
we don't select the additional dives in the trip (try it and hopefully
it will make sense).

b) it enables the ability to navigate the selected dive using cursor up
and cursor down. This also uses the magic trip handling mentioned in a)
(which is why they ended up being implemented together and mixed into
one ill-documented commit).

long time Subsurface users... please try this in the Qt branch and make
sure I got all the corner cases right (I'd be very surprised if I did,
to be honest - but I tried reasonably hard).

Qt developers. Please look at the actual code. Try not to throw up in
your mouth and make constructive suggestions how the same can be
achieved with better Qt code :-)

Happy Mother's Day, everyone (assuming you celebrate that in your
country this Sunday...)!

/D





More information about the subsurface mailing list