Select visible dives

Robert Helling helling at atdotde.de
Sat Apr 25 05:48:00 PDT 2020


Hi,

Jan Mulder reported a problem where doing „select visible dives“ in the map widget for a log with a larger number of dives freezes the program for several minutes.

I tracked this down to the fact, that the main window information is updated some 10.000 times during this operation on Jan’s example file.

It seems the culprit is in divelistview.cpp in the ruction

void DiveListView::selectDive(QModelIndex idx, bool scrollto)

which is called once per selected dive. In the end, this calls

selectionChangeDone();

which is supposed to update the UI (which is of course wrong in this case at this point as this should be done only once in the end). Removing this line seems to solve the original problem. But I don’t understand this part of the code well enough to see if removing it is save or if it is indeed required when the function is invoked in a different way.

Best
Robert




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20200425/ca8d8cdc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20200425/ca8d8cdc/attachment.sig>


More information about the subsurface mailing list