mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:13:24 +00:00
Fixed moving a dive point between dive points
Fixed moving a dive point between dive points. this fixes mostly everything that I have broked by using a Qt Model instead of a linked list - but a model is better to make everything updated and only poke in one place. sharing code++. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
3323fecea8
commit
65ab236948
1 changed files with 2 additions and 1 deletions
|
@ -988,7 +988,8 @@ int DivePlannerPointsModel::addStop(int meters, int minutes, const QString& gas,
|
|||
void DivePlannerPointsModel::editStop(int row, divedatapoint newData)
|
||||
{
|
||||
divepoints[row] = newData;
|
||||
emit dataChanged(createIndex(row, 0), createIndex(row, COLUMNS-1));
|
||||
std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan);
|
||||
emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
|
||||
}
|
||||
|
||||
divedatapoint DivePlannerPointsModel::at(int row)
|
||||
|
|
Loading…
Add table
Reference in a new issue