mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: explicitly update profile items
Instead of listening to the dive-data-model changed and axis changed signals, update the profile items explicitly once per plot() call. This avoids double replotting of the dive items. The old code had at least two replots per plot() call: one after profileYAxis()->setMaximum() and one after dataModel->emitDataChanged(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
dd0939b6f5
commit
0104b0a915
4 changed files with 5 additions and 12 deletions
|
@ -223,8 +223,3 @@ double DivePlotDataModel::po2Max() const
|
|||
{
|
||||
return max_gas(pInfo, &gas_pressures::o2);
|
||||
}
|
||||
|
||||
void DivePlotDataModel::emitDataChanged()
|
||||
{
|
||||
emit dataChanged(QModelIndex(), QModelIndex());
|
||||
}
|
||||
|
|
|
@ -85,7 +85,6 @@ public:
|
|||
double pheMax() const;
|
||||
double pn2Max() const;
|
||||
double po2Max() const;
|
||||
void emitDataChanged();
|
||||
|
||||
private:
|
||||
struct plot_info pInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue