<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/desktop-widgets, branch v4.9.3</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.3</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.3'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2019-09-07T15:28:29Z</updated>
<entry>
<title>Dive site: close dive site edit widget when dive site is deleted</title>
<updated>2019-09-07T15:28:29Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-09-06T20:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e3cd0891d312c448db6d6a19464efd3c521cd153'/>
<id>urn:sha1:e3cd0891d312c448db6d6a19464efd3c521cd153</id>
<content type='text'>
The application could be crashed by
1) Create dive site
2) Edit dive site
3) Undo until dive site is removed
4) Continue editing now non-existing dive site

Therefore, hook into the dive-site-deleted signal and if the
currently edited dive site is deleted, close the widget.

When closing the widget, make sure that the potentially
dangling pointer is reset to zero so that there is no
other potential use-after-free bug.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove unused MapWidget::repopulateLabels() function</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-09-03T06:34:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4479ccf8f32a0241e51dd5dcbcec28d2d26fb7af'/>
<id>urn:sha1:4479ccf8f32a0241e51dd5dcbcec28d2d26fb7af</id>
<content type='text'>
There is the alternative MapWidget::reload() function, which
centers on the selected dive-site.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: remove MapWidget::repopulateLabels() call</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-09-03T06:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=ca484c5029650c781b24279258215f8e351c2355'/>
<id>urn:sha1:ca484c5029650c781b24279258215f8e351c2355</id>
<content type='text'>
For historic reasons MapWidget::repopulateLabels() was called
in LocationInformationWidget::acceptChanges(). This should not
be necessary anymore, as this is done when entering/exiting
dive-site-mode.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: remove unnecessary MapLocationModel::repopulateLabels() calls</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-09-03T05:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=856fc357bc3c1db1c2d9fccf13022286d64aaeca'/>
<id>urn:sha1:856fc357bc3c1db1c2d9fccf13022286d64aaeca</id>
<content type='text'>
The LocationInformationWidget repopulated the map labels if the name
or location of a site changed. This is unnecessary because the
MapLocationModel catches these signals itself. Remove these calls.

As an added bonus, calling repopulateLabels() in QML context leads
to crashes later on. Therefore this should fix at least one
crash condition when dragging a flag on the map while the
dive-site-edit-tab is shown.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive site: don't emit divesChanged signals when editing dive site</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T13:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=f27d440bb39be201451d6066401e7c993c8223fa'/>
<id>urn:sha1:f27d440bb39be201451d6066401e7c993c8223fa</id>
<content type='text'>
When editing the dive site, for certain fields a divesChanged signal
was emitted so that the dive-list can be updated.

Arguably it is wrong to decide which fields are relevant to the
dive list in the undo-command code. Therefore, let the list
catch the dive-site-edited signal and decide itself.

But the actual reason for this commit is that if the dive-site
field of a dive changes, we might have to reload the dive-location-model
because suddenly a new dive site appears. Now if this is done
in QML context on some Qt version (notably 5.9) we get crashes
later on. But that can happen if the user moves a flag. So in that
case only send a diveSiteChanged signal.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: highlight correct dive sites in dive site mode</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T07:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=093adf1ea88dbcab465051b28f8a60a3a29f7a87'/>
<id>urn:sha1:093adf1ea88dbcab465051b28f8a60a3a29f7a87</id>
<content type='text'>
Since changing the highlighting to use the selected dive, dive
sites with no dive were never highlighted in dive site mode.
Obviously, because there was no dive to be selected.

Therefore special-case all dive-site selection code to recognize
when we are in dive site mode.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove TabDiveSite::updateFilter() function</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T06:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4713611ea8132f3c4b11b0a5409d500a5d271dd7'/>
<id>urn:sha1:4713611ea8132f3c4b11b0a5409d500a5d271dd7</id>
<content type='text'>
This one-liner was called in only one place from the same class.
Just fold it into the caller.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Selection: properly update selection flag of map location</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T15:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b7665251835cb6786c3b268fd0d04d69dccf36ed'/>
<id>urn:sha1:b7665251835cb6786c3b268fd0d04d69dccf36ed</id>
<content type='text'>
Owing to the recent changes, when the selection flag in the
MapLocationModel was not updated correctly when the user
manually selected the dive. Do that before raising the
divesSelected signal in DiveListView::selectionChanged()
because that will cause the MainWindow to repaint the flags.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Desktop: show all selected dive sites on click</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T15:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=488eb1542336088245841d79549e26938e2d3fd9'/>
<id>urn:sha1:488eb1542336088245841d79549e26938e2d3fd9</id>
<content type='text'>
When clicking a dive site on the map, the QML code would set
the selected dive site, but then all dives of dive sites in
the vicinity were set. But still only the clicked-on dive site
was shown.

Therefore, don't set the list of selected dive sites in QML,
but later in DiveListView::selectDives(), where we know all
the dives that were selected.

This, again, gives nasty entanglement of diverse widgets and
models.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: don't fully reset model on selection change</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-30T14:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b39f2406c6a520f0b3743324744f3c55914adc52'/>
<id>urn:sha1:b39f2406c6a520f0b3743324744f3c55914adc52</id>
<content type='text'>
When changing the selection the MapLocationModel was reset.
This lead to crashes on Qt-5.9 which are due to QML accessing
data that was freed during model reset. This putative Qt bug
doesn't happen on newer Qt versions. At least Qt-5.12 is known
to work.

Instead of fighting the bug, let's simply not reset the model
but send a dataChanged() for every element of the MapLocationModel.

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