[PATCH 2/2] dive merging: make sure that the dive is actually replotted after merging

Dirk Hohndel dirk at hohndel.org
Tue Sep 22 19:19:56 PDT 2015


On Tue, Sep 22, 2015 at 07:14:00PM -0700, Linus Torvalds wrote:
> 
> From: Linus Torvalds <torvalds at linux-foundation.org>
> Date: Tue, 22 Sep 2015 19:09:49 -0700
> Subject: [PATCH 2/2] dive merging: make sure that the dive is actually replotted after merging
> 
> This patch is disgusting: we call the "planCanceled" method to make sure
> that the dive profile window is updated.  That makes no sense, since
> we're not canceling any dive plans, but that method happens to repaint
> the profile, and there is no "good" name for it.

I completely agree with you. That's not a good way to do this. I think the
correct answer is to rename planCanceled() to replotDiveProfile() and then
have planCanceled() call that function.

And while doing that, instead of calling replot() and then plotDive()
(which causes us to plot the dive twice) simply restructure the code to do
the right thing but plot the dive only once.

Would you like me to do this instead of taking this patch?

/D


More information about the subsurface mailing list