diff options
-rw-r--r-- | profile-widget/profilewidget2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 5b0bd8286..384826fe4 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1822,12 +1822,12 @@ int ProfileWidget2::fixHandlerIndex(DiveHandler *activeHandler) if (index > 0 && index < handles.count() - 1) { DiveHandler *before = handles[index - 1]; if (before->pos().x() > activeHandler->pos().x()) { - handles.swap(index, index - 1); + std::swap(handles[index], handles[index - 1]); return index - 1; } DiveHandler *after = handles[index + 1]; if (after->pos().x() < activeHandler->pos().x()) { - handles.swap(index, index + 1); + std::swap(handles[index], handles[index + 1]); return index + 1; } } |