Select visible dives

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Sat Apr 25 07:00:46 PDT 2020


Hi Robert,

On Samstag, 25. April 2020 14:48:00 CEST Robert Helling via subsurface wrote:

> 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.

The call should indeed be removed - thanks for finding that. I suggest
https://github.com/Subsurface-divelog/subsurface/pull/2783, which includes 
more disentangling. For me that has still horrible performance as explained in 

https://github.com/Subsurface-divelog/subsurface/issues/
2776#issuecomment-619381850

I have a plan how to fix that as well - though it will have to wait until 
tomorrow.

Berthold




More information about the subsurface mailing list