X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fclipproperties.cpp;h=991666340ad4d06ca4433574d84a162694cb3952;hb=0ecaca991853809ccb21f4232a7edfee3e660237;hp=3fd5b351e4eca050e6bd5e3905f7879f5db89e31;hpb=664bf2e8e880714395658a254171b7d5b9ab264b;p=kdenlive diff --git a/src/clipproperties.cpp b/src/clipproperties.cpp index 3fd5b351..99166634 100644 --- a/src/clipproperties.cpp +++ b/src/clipproperties.cpp @@ -773,11 +773,16 @@ void ClipProperties::slotEditMarker() void ClipProperties::slotDeleteMarker() { QList < CommentedTime > marks = m_clip->commentedSnapMarkers(); - int pos = m_view.markers_list->currentIndex().row(); - if (pos < 0 || pos > marks.count() - 1) return; - CommentedTime marker = marks.at(pos); - marker.setMarkerType(-1); - emit addMarker(m_clip->getId(), marker); + QList < CommentedTime > toDelete; + for (int i = 0; i < marks.count(); i++) { + if (m_view.markers_list->topLevelItem(i)->isSelected()) { + CommentedTime marker = marks.at(i); + marker.setMarkerType(-1); + toDelete << marker; + } + } + for (int i = 0; i < toDelete.count(); i++) + emit addMarker(m_clip->getId(), toDelete.at(i)); } const QString &ClipProperties::clipId() const