<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/desktop-widgets/tab-widgets, branch v4.9.4</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom/desktop-widgets/tab-widgets?h=v4.9.4</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom/desktop-widgets/tab-widgets?h=v4.9.4'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2020-05-02T12:52:51Z</updated>
<entry>
<title>desktop: fix editing of trips</title>
<updated>2020-05-02T12:52:51Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-02T12:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a8130f0fa16a35dd647d04449c8e561156e86549'/>
<id>urn:sha1:a8130f0fa16a35dd647d04449c8e561156e86549</id>
<content type='text'>
In 2021035cfcee08ec4c6f9d16683db8ce400bef30 a bug was introduced:
currentTrip of MainTab was not set in trip mode. Thus, when editing
the trip notes, the notes of all selected dives were edited instead.

Set the member variable and not a local variable.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: don't replot profile when populating dive information tab</title>
<updated>2020-04-30T21:14:13Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-30T19:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=60b00162a9cc666a1af062d2610f28cfe7df09ae'/>
<id>urn:sha1:60b00162a9cc666a1af062d2610f28cfe7df09ae</id>
<content type='text'>
When the dive mode is changed, the profile has to be replot. This
is by a function of the TabDiveInformation. However, that function
was also executed when populating the tab. Thus, when changing dive,
the profile was plot twice.

Move the profile plotting out of the function. Ultimately, the profile
should listen to the appropriate signals itself.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>selection: replace selectedTrips() by singleSelectedTrip() function</title>
<updated>2020-04-26T20:54:59Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-26T20:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2021035cfcee08ec4c6f9d16683db8ce400bef30'/>
<id>urn:sha1:2021035cfcee08ec4c6f9d16683db8ce400bef30</id>
<content type='text'>
To check wether the tab widgets should show the trip view, they called
the selectedTrips() function. The trip view was shown if that contained
only one trip. However, the selectedTrips() function was very slow,
because it has to query to core models.

Change the function to singleSelectedTrip(), which returns a trip
if there is exactly one trip selected. The function returns early
if there is more than one trip selected. This makes the select-all
case much faster.

There are two cases which are still very slow:
- List mode, because here all top-level items are queried.
- Dive log with many only top-level items.

Ultimately, we will have to cache the trip selection because
querying the model is too slow.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: don't access first data element if no cylinders</title>
<updated>2020-04-21T14:50:38Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-21T06:59:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a8aa8971176239fa4d428aaa4599d1f996e11885'/>
<id>urn:sha1:a8aa8971176239fa4d428aaa4599d1f996e11885</id>
<content type='text'>
TabDiveInformation::updateProfile() does some statistics via the
per_cylinder_mean_depth function. It passes down arrays with one
entry per cylinder, which are allocated by means std::vector.

To pass the array, the expression "&amp;vector[0]" is used. It seems
like some compilers through an assertion violation if vector
has no elements. They are technically correct in that this is
undefined, but still this appears like very unfriendly behavior.
After all, std::vector should behave just like a dynamic C-array
that is automatically freed, when going out of scope.

Replace the "&amp;vector[0]" by "vector.data()" and don't do the
call if there aren't any cylinders for good measure.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: rearrange widgets on the dive site tab</title>
<updated>2020-04-20T16:46:24Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-20T12:38:09Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a3238020eebedaf110bd0b63a9f16aa2b605efe0'/>
<id>urn:sha1:a3238020eebedaf110bd0b63a9f16aa2b605efe0</id>
<content type='text'>
Move the more commonly used filter to the left and the less
commonly used "purge unused sites" button to the right. Add
a spacer so that the filter-textbox doesn't extend over the
whole free space.

With apologies to sinistroverse users (is there an option to
make the layout direction depend on the locale?).

Suggested-by: Hartley Horwitz &lt;hhrwtz@gmail.com&gt;
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop: remove special QGroupBox stylesheet for non-Windows systems</title>
<updated>2020-04-13T17:14:00Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-13T10:00:38Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b4e0968ed5a8ff197272c58ed08c949d9c2c0813'/>
<id>urn:sha1:b4e0968ed5a8ff197272c58ed08c949d9c2c0813</id>
<content type='text'>
That style-sheet made things look really ugly on most Linux themes.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: remove unneeded includes from TabDiveEquipment.cpp</title>
<updated>2020-04-06T22:13:35Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-03-27T20:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=39bc6e3bddbb45bec8933723b4e9fc64a865236b'/>
<id>urn:sha1:39bc6e3bddbb45bec8933723b4e9fc64a865236b</id>
<content type='text'>
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>undo: show multiple dive warning when editing equipment</title>
<updated>2020-04-06T22:13:35Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-03-27T20:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=63414fc82394031a9ce9c25d635430107fde19e0'/>
<id>urn:sha1:63414fc82394031a9ce9c25d635430107fde19e0</id>
<content type='text'>
When editing cylinders or weights directly in the table widgets,
no warning was shown if multiple dives were affected. To solve this,
emit signals from the respective models and catch them in dive
equipment tab. Not very nice, but it works for now.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop/tabwidgets: replace editMode by boolean</title>
<updated>2020-04-06T22:13:35Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-03-18T21:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=20e70646584e71f03e5983660c21e7a7e097cf39'/>
<id>urn:sha1:20e70646584e71f03e5983660c21e7a7e097cf39</id>
<content type='text'>
There was only one editMode left (MANUALLY_ADDED_DIVE).
Therefore replace by a flag. This makes the code more consistent,
because the conditions "editMode != NONE" and "editMode ==
MANUALLY_ADDED_DIVE) actually meant the same thing.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>desktop/tabwidgets: replace IGNORE_MODE by flag</title>
<updated>2020-04-06T22:13:35Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-03-18T21:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=3b9913d82893ca023eaea2e25cdbc86765aeb40a'/>
<id>urn:sha1:3b9913d82893ca023eaea2e25cdbc86765aeb40a</id>
<content type='text'>
The editMode was set to IGNORE_MODE when programatically setting
fields so that we can ignore changed-signals.

That seems to be orthogonal to whether we are in edit mode
and indeed when setting IGNORE_MODE the edit mode was
saved and restored.

Therefore, replace the IGNORE_MODE by an independent ignoreInput
flag.

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