[PATCH 3/4] MainWindow: maintain one window instance of the yearly statistics

Dirk Hohndel dirk at hohndel.org
Tue Mar 11 11:25:25 PDT 2014


On Tue, 2014-03-11 at 18:31 +0200, Lubomir I. Ivanov wrote:
> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
> 
> This is a bit tricky because we are using a plain widget for
> a window and don't have a class for it (req. more source files).

We already have 140 source files. If it takes a few more to architect
things better, so be it.
Also it's not a hard requirement for every class to have its own
source / header files (see models.cpp/.h)

> Also for the table model to update we need to create a new
> YearlyStatisticsModel instance each time. At least, in that regard
> we can re-create the model each time refreshDisplay() is called.

It's my understanding that we do this because we have to recalculate the
values, anyway, as we don't know what data in the dive list changed when
refreshDisplay() is called.

/D



More information about the subsurface mailing list