mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove redundant timestamp lookup for DiveEventItems
When placing the event icons, the timestamp is looked up and then, the depth is checked which repeats this operation. Remove the first instance of this lookup, as it is completely redundant. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8a9ca5fcda
commit
8d4d35ea69
1 changed files with 0 additions and 6 deletions
|
@ -229,12 +229,6 @@ void DiveEventItem::recalculatePos(int speed)
|
|||
if (!ev)
|
||||
return;
|
||||
|
||||
QModelIndexList result = dataModel->match(dataModel->index(0, DivePlotDataModel::TIME), Qt::DisplayRole, ev->time.seconds);
|
||||
if (result.isEmpty()) {
|
||||
qWarning("can't find a spot in the dataModel");
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
int depth = depthAtTime(*dataModel, ev->time.seconds);
|
||||
if (depth == DEPTH_NOT_FOUND) {
|
||||
hide();
|
||||
|
|
Loading…
Add table
Reference in a new issue