subsurface/qt-ui
Linus Torvalds c9113a1f42 Sort 'dive number' column by date, not number
Ok, so this sounds insane, but it fixes our currently broken sorting
of dive trips vs plain dives not in trips.

The reason for that is simple: the dive trips are sorted by date, but
that's column #0, and for plain dives is the dive number.

So currently the trip-vs-dive sorting looks at the date of the trip,
and compares that to the number of the dive. Since the date of the
trip is expressed as seconds-since-1970-in-UTC, unsurprisingly the
dive number is generally much smaller (even for some very avid divers
;), and so the plain dives end up sorting way at the bottom (or at the
top, if you do "oldest trips first"

Since the dive number *should* sort as the date, this stupid attached
patch just makes us return the dive date instead.

Now, there are other possible solutions to this:

 - make the date of the dive be column 0, and make the dive number be column 1.

   Quite frankly, while more logical for this particular problem, it
probably sucks as a solution. We do want to have a column we can sort
dives by that is date-based, but doesn't include trips. And while the
dive number *should* sort identically to the date one, the fact is
that you can have dives without any numbering, so it doesn't.

   In contrast, all dives have dates, and sorting numbered dives by
date should still result in sane behavior (and if it doesn't, then the
insanity comes from the dive numbering, and odd sorting is the fault
of the user and indicative of a problem)

 - We could possibly do something magical like sorting dives by number
when they are inside trips, or when no trips exist at all. But then
we'd sort by date when there are trips and the dive is outside the
trip. But quite frankly, that just sounds insane.

So on the whole, I don't love this patch, but it seems to be the least
confusing of the possibilities.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-08 20:45:29 -07:00
..
marble Work around broken Marble on Debian 2013-05-18 09:49:37 -07:00
divelistview.cpp Use the official QItemSelectionModel::SelectionFlags 2013-06-08 07:12:08 -07:00
divelistview.h Make a map ctrl-click toggle the selection state 2013-06-07 21:39:52 -07:00
downloadfromdivecomputer.cpp Fixed running the Download dialog multiple times 2013-05-30 18:21:08 +09:00
downloadfromdivecomputer.h Fixed running the Download dialog multiple times 2013-05-30 18:21:08 +09:00
downloadfromdivecomputer.ui Implement rudimentary divecomputer download 2013-05-20 21:55:56 -07:00
globe.cpp Fix compile: mixup of GeoDataCoordinates and GeoDataPoint 2013-06-07 22:06:46 -07:00
globe.h Get single click on the map widget in a callback for further processing 2013-06-05 14:44:12 +09:00
kmessagewidget.cpp Fixed the 'click in close doesn't close' on KMessageWidget. 2013-05-22 08:10:02 -03:00
kmessagewidget.h Compile fix 2013-05-17 22:27:50 -07:00
maintab.cpp Disable Document Mode for MainTab on MacOSX 2013-06-07 21:42:13 -07:00
maintab.h Remove obsolete slots 2013-05-23 18:35:04 -07:00
maintab.ui Disable Document Mode for MainTab on MacOSX 2013-06-07 21:42:13 -07:00
mainwindow.cpp Merge branch '112_webservices' of https://github.com/tcanabrava/subsurface 2013-06-07 13:31:42 +09:00
mainwindow.h Rewrite readSettings to do what it should have done from the start 2013-06-04 21:40:28 +09:00
mainwindow.ui Added the 'F1' key as standard shortcut for the Help 2013-05-31 05:32:59 +09:00
modeldelegates.cpp Correctly add new weight / cylinder types, even when hitting 'tab' 2013-05-23 23:26:17 -07:00
modeldelegates.h Add weightsystem delegate to enable editing of weightsystem 2013-05-23 21:36:33 -07:00
models.cpp Sort 'dive number' column by date, not number 2013-06-08 20:45:29 -07:00
models.h Try to get rid of unnecessary reloads of the dive list 2013-06-06 11:28:20 +09:00
plotareascene.cpp Add Qtr_ macros that uses gettext in a tr() compatible manner 2013-04-13 20:44:02 -07:00
plotareascene.h Add Qtr_ macros that uses gettext in a tr() compatible manner 2013-04-13 20:44:02 -07:00
preferences.cpp Explicitly store UI values to prefs 2013-06-04 06:29:33 +09:00
preferences.h Tie all the pieces together and make Preferences work as intended 2013-06-03 21:08:49 +09:00
preferences.ui Correctly implement Metric / Imperial / Personalize preference 2013-06-02 19:52:18 +09:00
profilegraphics.cpp Hide/Show tooltip on mouse over view widget 2013-06-07 21:25:16 -07:00
profilegraphics.h Hide/Show tooltip on mouse over view widget 2013-06-07 21:25:16 -07:00
simplewidgets.cpp Added a new widget 'MinMaxAvgWidget' 2013-06-04 18:51:27 -03:00
simplewidgets.h Added a new widget 'MinMaxAvgWidget' 2013-06-04 18:51:27 -03:00
starwidget.cpp The never ending, futile fight for whitespace consistency 2013-05-22 21:31:45 -07:00
starwidget.h Added option to edit the selected dive. 2013-05-18 17:06:48 -07:00
subsurfacewebservices.cpp Hoocked up the Apply button. 2013-06-06 11:57:12 -03:00
subsurfacewebservices.h Hoocked up the buttons and the parsing of the XML. 2013-06-06 11:31:55 -03:00
subsurfacewebservices.ui Hoocked up the buttons and the parsing of the XML. 2013-06-06 11:31:55 -03:00