<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">It seems the culprit is in divelistview.cpp in the ruction</div><div class=""><br class=""></div><div class="">
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment--><span style=" color:#808000;" class="">void</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#800080;" class="">DiveListView</span>::<span style=" font-weight:600; color:#00677c;" class="">selectDive</span>(<span style=" color:#800080;" class="">QModelIndex</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#092e64;" class="">idx</span>,<span style=" color:#c0c0c0;" class=""> </span><span style=" color:#808000;" class="">bool</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#092e64;" class="">scrollto</span>)</pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class="">which is called once per selected dive. In the end, this calls </pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#00677c;" class="">selectionChangeDone</span>();</pre><span class=""><br class=""></span><span class="">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.</span></pre><span class=""><br class=""></span><pre style="margin-top: 0px; margin-bottom: 0px;" class="">Best</pre><pre style="margin-top: 0px; margin-bottom: 0px;" class="">Robert
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""><!--EndFragment--></pre><div class=""><br class=""></div></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""><!--EndFragment--></pre><div class=""><br class=""></div></div></body></html>