<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/qt-models, branch v4.9.7</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.7</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.7'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2020-09-21T01:21:56Z</updated>
<entry>
<title>dive list: on reload update filter status</title>
<updated>2020-09-21T01:21:56Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-20T11:40:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=43390d4a9aa1a6c78e36ae2dd32e8421f9060c92'/>
<id>urn:sha1:43390d4a9aa1a6c78e36ae2dd32e8421f9060c92</id>
<content type='text'>
At some time, when introducing the global reset signal the filter
stopped being reloaded when loading a new log. This leads to very
strange UI behavior: dives disappear when editing fields unrelated
to the filter.

Therefore, when reloading the model, reset the filter. One might
argue whether this is the correct place. On the other hand, we
might even make the filter a sub-object of the dive-list model.
Let's think about this.

Partially solves #2961

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: fold core/divecomputer.cpp into core/device.c</title>
<updated>2020-09-13T20:54:59Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-13T17:08:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a01ab817139be16906c30f89e16a0a3fbbe026cd'/>
<id>urn:sha1:a01ab817139be16906c30f89e16a0a3fbbe026cd</id>
<content type='text'>
core/device.h was declaring a number of functions that were related
to divecomputers (dcs): creating a fake dc for manually entered dives
and registering / accessing dc nicknames. On could argue whether
these should be lumped together, but it is what it is.

However, part of that was implemented in C++/Qt code in a separate
core/divecomputer.cpp file. Some function therein where only
accessible to C++ and declared in core/divecomputer.h.

All in all, a big mess. Let's simply combine the files and
conditionally compile the C++-only functions depending on
the __cplusplus define.

Yes, that means turning device.c into device.cpp. A brave soul
might turn the C++/Qt code into C code if they whish later on.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: remove DiveComputerModel::numRows</title>
<updated>2020-09-13T20:54:59Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-12T21:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e6145b5498a61cd5625b3712a6501b9021acb27e'/>
<id>urn:sha1:e6145b5498a61cd5625b3712a6501b9021acb27e</id>
<content type='text'>
This member variable was unused.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: refine auto-fill of weights</title>
<updated>2020-09-12T17:36:36Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-12T16:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=6ea0cc62b8c7b01c37fdfbe50e3cefde4c43d360'/>
<id>urn:sha1:6ea0cc62b8c7b01c37fdfbe50e3cefde4c43d360</id>
<content type='text'>
In a previous commit, auto-filling of weight based on type was
changed to be only performed if the user hadn't already set a
weight, by testing for weight=0.

However, when the user edited the type and tabbed back and forth,
that counted as an edit and therefore the weight would not
change anymore.

To refine this, introduce an "auto_filled" flag to the weightsystem,
which is set if the weight is automatically filled and cleared if
the weight is edited. Update the weight if it was zero *or* auto-filled.

The flag is not saved to disk, but that should be acceptable. If the
user saves and reloads, we can assume that they meant the weight
to be set to the default value.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: on weight type change, don't overwrite weight if already set</title>
<updated>2020-09-12T17:36:36Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-12T10:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=72312bec2f4dcde3150a2d989bd729237c704d66'/>
<id>urn:sha1:72312bec2f4dcde3150a2d989bd729237c704d66</id>
<content type='text'>
When importing from other software, it happens that weights are imported
without their type. When the user changes the type, the imported weight
is overwritten, which is not exactly a friendly behavior.

On the other hand, when changing the type after creation of a weight
entry, it is preferrable to set a default weight. This is convenient
for people who commonly use the same weight.

As a compromise, set the default weight only if it was unset. We
recognize this by a weight value of 0 g.

Fixes #2938

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Planner: enforce minimal segement duration</title>
<updated>2020-08-24T15:31:40Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2020-08-22T11:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e946ce98feb6144548d0f3a12d8c39b5b2a6d02d'/>
<id>urn:sha1:e946ce98feb6144548d0f3a12d8c39b5b2a6d02d</id>
<content type='text'>
You cannot be at two depths at the same time (and it confuses
the planner). So give yourself at least 10 seconds.

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>Planner: handle zero length segments when replanning</title>
<updated>2020-08-24T15:30:00Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2020-08-17T20:04:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=62d87e9d25763e81757de417640f464e2bf5a2c0'/>
<id>urn:sha1:62d87e9d25763e81757de417640f464e2bf5a2c0</id>
<content type='text'>
When setting up a dive for replanning, we ignored zero length segments as those
tend to be generated by gas changes. But it is possible to enter those in the
planner and the replanning should not ignore those. So be
more clever about gas changes. Let's add 10 seconds so we are not at two depths
at the same time and help since add_stop also does not like zero length
segments (it thinks we are trying to replace a waypoint).

Fixes #2901

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>cleanup: consistently use get_cylinder() accessor</title>
<updated>2020-08-21T15:48:22Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-08-20T05:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=fe3021b88a414b6963891a65b738f52bc41e36a8'/>
<id>urn:sha1:fe3021b88a414b6963891a65b738f52bc41e36a8</id>
<content type='text'>
get_cylinder(d, i) is more readable than d-&gt;cylinders.cylinders[i].
Moreover, it does bound checking and is more flexible with respect to
changing the core data structures. Most places already used this accessor,
but some still accessed the cylinders directly.

This patch unifies the accesses by consistently switching to get_cylinder().
The affected code is in C++ and accesses the cylinder as reference or
object, whereas the get_cylinder() function is C and returns a pointer.
This results in funky looking "*get_cylinder(d, i)" expressions.
Arguably still better than the original.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Make MND display depend on O2 narcotic preference</title>
<updated>2020-07-11T17:37:49Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2020-07-11T11:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=912e1faaf21afbfac0cec07db036d97b13ed847c'/>
<id>urn:sha1:912e1faaf21afbfac0cec07db036d97b13ed847c</id>
<content type='text'>
A while ago, we introduced a preference whether O2 should
be considered narcotic. We used this when computing
best mix or when entering the He content via MND. But
we forgot to make the displayed MND depend on this
preference. This patch add this.

Fixes #2895

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>cleanup: create common QDateTime -&gt; timestamp conversion function</title>
<updated>2020-05-22T19:31:06Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-22T16:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=8f80129bac29227a03c35940af9d197ef0fa6398'/>
<id>urn:sha1:8f80129bac29227a03c35940af9d197ef0fa6398</id>
<content type='text'>
In analogy to the timestamp -&gt; QDateTime conversion, create a
common function.
1) For symmetry with the opposite conversion.
2) To remove numerous inconsistencies.
3) To remove use of the deprecated QDateTime::toTime_t() function.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
