add dive implementation pushed

Dirk Hohndel dirk at hohndel.org
Sat Sep 21 08:11:01 UTC 2013


On Sat, 2013-09-21 at 11:56 +0200, Henrik Brautaset Aronsen wrote:
> Dirk Hohndel wrote: 
> > This uses part of the planner widget to allow the user to actually
> > create a profile for their dive.
> 
> Cool!  Some issues:
> 
> (1) when I double click one of the nodes on the graph, I'm unable to
> exit that dialog (see http://imgbin.org/images/15123.png) or save the
> dive.

Simply pick one of the values and the dialog goes away. Yes, Escape
should close it, too. And of course you should be able to add your own
gas, not just one of the three standard gases.

> (2) I think there's too many nodes on the graph, the user will have to
> move too many of them.  Not user friendly.  So:
>     - either add an initial dialog where the dive depth can be
> entered, and the graph can be created after that
>     - or (my favorite) just create *two* nodes, with a fairly square
> graph

How about *four* nodes and we include a safety stop? So I'll remove the
15 minutes at the shallower depth.
> 
> (3) I got a "ASSERT failure in QVector<T>::at: "index out of range",
> file /opt/local/include/QtCore/qvector.h, line 351" when trying to
> edit the first node, with a subsequent crash.  Haven't been able to
> reproduce it, but still...:
> 
> 0   libsystem_kernel.dylib            0x00007fff9892d212 __pthread_kill + 10
> 1   libsystem_c.dylib                 0x00007fff9030ab24 pthread_kill + 90
> 2   libsystem_c.dylib                 0x00007fff9034ef61 abort + 143
> 3   QtCore                            0x000000010be8ba9a qt_message_output(QtMsgType, char const*) + 154
> 4   QtCore                            0x000000010be8bd55 qt_message(QtMsgType, char const*, __va_list_tag*) + 405
> 5   QtCore                            0x000000010be8b64f qFatal(char const*, ...) + 159
> 6   subsurface                        0x00000001091e6897 QVector<divedatapoint>::at(int) const + 83 (qvector.h:351)
> 7   subsurface                        0x00000001091cd49f DivePlannerPointsModel::at(int) + 59 (diveplanner.cpp:1120)
> 8   subsurface                        0x00000001091d7285 DivePlannerGraphics::moveActiveHandler(QPointF const&, int) + 49 (diveplanner.cpp:552)
> 9   subsurface                        0x00000001091d7c34 DivePlannerGraphics::mouseMoveEvent(QMouseEvent*) + 2056 (diveplanner.cpp:536)

So the bug is caused by this code:

divedatapoint DivePlannerPointsModel::at(int row)
{
        return divepoints.at(row);
}

Stick a qDebug("I'm at row %d", row); in there and see what triggers it.
What exactly do you mean by 'edit the first node'? Move it around? I can
do that til the cows come home...

> (4) The graph symbols at the top left and bottom right are still
> unintuitive and fairly ugly.  (ref. that screenshot in (1))

Luisa is working on making those gorgeous and intuitive. So let's just
wait and see (I believe she and Tomaz are out diving today so all this
will hopefully make more sense to her once she's seen what this is all
about).
> 
> (5) The graph can become messed up after moving the nodes (see
> http://imgbin.org/images/15125.png)

Yes, this is something on my todo list. My laptop ran out of battery on
yesterday's flight and today is my first back home after being gone for
over a week so my kids would like some of my attention, too...
> 
> (6) A node can be moved before time=0, and subsurface crashes when
> trying to save that dive (see http://imgbin.org/images/15126.png):

a) it shouldn't and b) it can't for me. How are you doing that? Can you
do a screencast video that shows how you get the node to move before 0?

Thanks for the detailed feedback!

/D




More information about the subsurface mailing list