<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I was just looking at the layout of the planner, and realized that I couldn't find a use for the use field in the available gasses table.<br><br></div>We determine whether or not a segment is closed circuit by whether a setpoint has been set in the dive planner points table.  It doesn't look like we actually use the cylinder use value.<br><br></div>Can it be removed?<br><br></div>Furthermore, the only way I could find to set the value is to type in the number (0-7) corresponding to the enum.  There's no drop-down of options, and typing the name of the value doesn't work.  There's also a lovely segfault when I enter the value 8 (or any value greater than 7).  If I enter a negative number, the text becomes one of the default dive tags.  Yay memory.  Segfault with value 8.<br><br>(gdb) bt<br>#0  0x00007ffff0e5db3a in strlen () from /lib64/libc.so.6<br>#1  0x00007ffff1a097c0 in QByteArray::QByteArray(char const*, int) () from /lib64/libQt5Core.so.5<br>#2  0x00000000006d0105 in gettextFromC::trGettext (this=0xcf5d50, text=0xd1 <error: Cannot access memory at address 0xd1>)<br>    at /home/rick/src/subsurface/core/gettextfromc.cpp:7<br>#3  0x000000000065470a in CylindersModel::data (this=0xec1020, index=..., role=2) at /home/rick/src/subsurface/qt-models/cylindermodel.cpp:138<br>#4  0x00007ffff4eb2e20 in QStyledItemDelegate::setEditorData(QWidget*, QModelIndex const&) const () from /lib64/libQt5Widgets.so.5<br>#5  0x00007ffff4e343c3 in QAbstractItemView::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) () from /lib64/libQt5Widgets.so.5<br>#6  0x00007ffff4e33378 in QAbstractItemView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libQt5Widgets.so.5<br>#7  0x00007ffff1c060a0 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5<br>#8  0x00007ffff1c7eb8c in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) () from /lib64/libQt5Core.so.5<br>#9  0x0000000000655c73 in CylindersModel::setData (this=0xec1020, index=..., value=..., role=2) at /home/rick/src/subsurface/qt-models/cylindermodel.cpp:283<br>#10 0x00007ffff4eb2cb1 in QStyledItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const () from /lib64/libQt5Widgets.so.5<br>#11 0x00007ffff4e32ea2 in QAbstractItemView::commitData(QWidget*) () from /lib64/libQt5Widgets.so.5<br>#12 0x00007ffff4e334f0 in QAbstractItemView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libQt5Widgets.so.5<br>#13 0x00007ffff1c060a0 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5<br>#14 0x00007ffff4e795af in QAbstractItemDelegate::commitData(QWidget*) () from /lib64/libQt5Widgets.so.5<br>#15 0x00007ffff4e79e25 in QAbstractItemDelegatePrivate::_q_commitDataAndCloseEditor(QWidget*) () from /lib64/libQt5Widgets.so.5<br>#16 0x00007ffff4e79f98 in QAbstractItemDelegate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /lib64/libQt5Widgets.so.5<br>#17 0x00007ffff1c06ed9 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5<br>#18 0x00007ffff4bd4c0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#19 0x00007ffff4bd9e96 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5<br>#20 0x00007ffff1bd9968 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5<br>#21 0x00007ffff1bdb82a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5<br>#22 0x00007ffff1c2e8e3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5<br>#23 0x00007fffebdb7e3a in g_main_dispatch (context=0x7fffd40016f0) at gmain.c:3154<br>#24 g_main_context_dispatch (context=context@entry=0x7fffd40016f0) at gmain.c:3769<br>#25 0x00007fffebdb81d0 in g_main_context_iterate (context=context@entry=0x7fffd40016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)<br>    at gmain.c:3840<br>#26 0x00007fffebdb827c in g_main_context_iteration (context=0x7fffd40016f0, may_block=1) at gmain.c:3901<br>#27 0x00007ffff1c2ecef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#28 0x00007ffff1bd76ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5<br>#29 0x00007ffff1bdfddc in QCoreApplication::exec() () from /lib64/libQt5Core.so.5<br>#30 0x000000000050aae9 in run_ui () at /home/rick/src/subsurface/subsurface-desktop-helper.cpp:45<br>#31 0x0000000000509a41 in main (argc=2, argv=0x7fffffffdd68) at /home/rick/src/subsurface/subsurface-desktop-main.cpp:107<br><br><br></div>Cheers,<br><br></div>Rick<br></div>