mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UI restructure: don't use random dives from the divelist for data
Everything should come from the displayed_dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
117b212cdd
commit
d8c3113584
4 changed files with 28 additions and 40 deletions
|
@ -146,11 +146,6 @@ void DivePlotDataModel::setDive(dive *d, const plot_info &info)
|
|||
endInsertRows();
|
||||
}
|
||||
|
||||
int DivePlotDataModel::id() const
|
||||
{
|
||||
return diveId;
|
||||
}
|
||||
|
||||
unsigned int DivePlotDataModel::dcShown() const
|
||||
{
|
||||
return dcNr;
|
||||
|
@ -178,9 +173,8 @@ void DivePlotDataModel::emitDataChanged()
|
|||
|
||||
void DivePlotDataModel::calculateDecompression()
|
||||
{
|
||||
struct dive *d = get_dive_by_uniq_id(id());
|
||||
struct divecomputer *dc = select_dc(d);
|
||||
init_decompression(d);
|
||||
calculate_deco_information(d, dc, &pInfo, false);
|
||||
struct divecomputer *dc = select_dc(&displayed_dive);
|
||||
init_decompression(&displayed_dive);
|
||||
calculate_deco_information(&displayed_dive, dc, &pInfo, false);
|
||||
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue