<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/commands, 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-09T00:20:09Z</updated>
<entry>
<title>cleanup: remove count_divecomputers() function</title>
<updated>2020-09-09T00:20:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-06T15:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=048cdcaa318f111e12d78c60927a0e2fc30eb1d6'/>
<id>urn:sha1:048cdcaa318f111e12d78c60927a0e2fc30eb1d6</id>
<content type='text'>
There is a number_of_computers() function which does
the same thing with two exceptions:
1) checks for null-dive
2) returns an unsigned int

Replace calls to count_divecomputers() by calls to number_of_computers().
In one case, the return type makes a different - add a cast to int there.
Ultimately, we should probably change the dc_number to signed int
throughout the code.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: copy string in taxonomy_set_[country|category]</title>
<updated>2020-09-06T19:59:54Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-09-05T11:30:04Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=55e42373066ade9ad2e1a51adf27a0a28cb0d02a'/>
<id>urn:sha1:55e42373066ade9ad2e1a51adf27a0a28cb0d02a</id>
<content type='text'>
These functions were taking a const char *, yet taking ownership
of the value. Moreover, taking ownership of strings is rather
unusual in C-style APIs. Let's copy the string instead.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&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>media: give newly created dive sites a name</title>
<updated>2020-05-08T15:51:37Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-08T09:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=ab6cac9799192f1478c150b2ce63906901db2b3b'/>
<id>urn:sha1:ab6cac9799192f1478c150b2ce63906901db2b3b</id>
<content type='text'>
When adding a picture with GPS information, a dive site was added
if the dive didn't have any. The dive site had the empty string as
name, leading to a confusing UI experience.

We could catch the empty string at numerous places and replace it
by some dummy string. This commit goes the distinctly less invasive
route and adds the dive site with the "unnamed dive site" string
(translated to the user language) as name.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>undo: make adding of pictures undoable</title>
<updated>2020-05-06T20:58:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-19T16:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4374605c1295ede804d1ae1355094f8a3e0429e9'/>
<id>urn:sha1:4374605c1295ede804d1ae1355094f8a3e0429e9</id>
<content type='text'>
This one is a bit hairy, because two things might happen if the
picture has a geo location:
- A dive gets a newly generated dive site set.
- The dive site of a dive is edited.
Therefore the undo command has to store keep track of that.
Oh my.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>undo: make picture (media) deletion undoable</title>
<updated>2020-05-06T20:58:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-17T21:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=434644b381cb1dc8d2080b19a9725bfe2660a217'/>
<id>urn:sha1:434644b381cb1dc8d2080b19a9725bfe2660a217</id>
<content type='text'>
The code is rather complex. Firstly, we have different representations
of pictures throughout the code. Secondly, this tries to do add the
pictures in batches to the divepicture model and that is always rather
tricky.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>undo: implement undo of setting a picture time by drag&amp;drop</title>
<updated>2020-05-06T20:58:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-14T20:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e61641c79cd57bfa55d2371615a7eef7c73b4eb7'/>
<id>urn:sha1:e61641c79cd57bfa55d2371615a7eef7c73b4eb7</id>
<content type='text'>
Even though the functionality is seemingly trivial, this is a bit
invasive, as the code has to be split into two distinct parts:
1) Post undo command
2) React to changes to the divelist

Don't compile that code on mobile.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>undo: update cylinder related info when editing cylinder data</title>
<updated>2020-05-06T18:44:22Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-05T09:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=beef8096f7d3f580804a30a55364b057897dfcb3'/>
<id>urn:sha1:beef8096f7d3f580804a30a55364b057897dfcb3</id>
<content type='text'>
We have to call update_cylinder_related_info() when adding /
editing / removing cylinders. This could be done in a common
base class of the commands. For simplicity, let's call
the function in the respective undo()/redo() functions.

Partially fixes #2814.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>selection: add selection flag for trips</title>
<updated>2020-05-03T22:02:21Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-02T12:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=09b7fcbcf4e26d19529486ddd2a0e672e60dce32'/>
<id>urn:sha1:09b7fcbcf4e26d19529486ddd2a0e672e60dce32</id>
<content type='text'>
In analogy to dives add a selection flag for trips. The reason
being that search for a selected trip can be painfully slow when
we do it through Qt's proxy model.

Make sure to deselect trips when they are removed from the core.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: remove unnecessary include in command_divelist.cpp</title>
<updated>2020-05-02T12:52:51Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-02T11:52:16Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e535ac90f944a568bf1d96571774be702345a8e2'/>
<id>urn:sha1:e535ac90f944a568bf1d96571774be702345a8e2</id>
<content type='text'>
"code/display.h" needs not be included anymore for selection
things.

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