Changeset View
Changeset View
Standalone View
Standalone View
src/timeline2/model/trackmodel.cpp
Context not available. | |||||
333 | } | 333 | } | ||
---|---|---|---|---|---|
334 | auto old_clip = m_allClips[clipId]; | 334 | auto old_clip = m_allClips[clipId]; | ||
335 | int old_position = old_clip->getPosition(); | 335 | int old_position = old_clip->getPosition(); | ||
336 | qDebug() << "/// REQUESTOING CLIP DELETION_: " << updateView; | | |||
337 | auto operation = requestClipDeletion_lambda(clipId, updateView, finalMove); | 336 | auto operation = requestClipDeletion_lambda(clipId, updateView, finalMove); | ||
338 | if (operation()) { | 337 | if (operation()) { | ||
339 | if (updateView) { | 338 | if (updateView) { | ||
339 | //qDebug()<<"xxxxxxxxxxxxxxxxx\npreparing delete ix: "<<sourceIndex.parent()<<"\nxxxxxx"; | ||||
340 | list.emplace_back(std::make_shared<DeleteUpdate>(clipId, m_parent, getId(), old_position, true)); | 340 | list.emplace_back(std::make_shared<DeleteUpdate>(clipId, m_parent, getId(), old_position, true)); | ||
341 | } | 341 | } | ||
342 | auto reverse = requestClipInsertion_lambda(clipId, old_position, updateView, finalMove); | 342 | auto reverse = requestClipInsertion_lambda(clipId, old_position, updateView, finalMove); | ||
Context not available. | |||||
381 | other_index = m_playlists[other_track].get_clip_index_at(last_pos); | 381 | other_index = m_playlists[other_track].get_clip_index_at(last_pos); | ||
382 | index--; | 382 | index--; | ||
383 | } | 383 | } | ||
384 | if (index < 0) return 0; | 384 | if (index < 0) { | ||
385 | return 0; | ||||
386 | } | ||||
385 | int length = INT_MAX; | 387 | int length = INT_MAX; | ||
386 | if (index < m_playlists[track].count()) { | 388 | if (index < m_playlists[track].count()) { | ||
387 | if (!m_playlists[track].is_blank(index)) { | 389 | if (!m_playlists[track].is_blank(index)) { | ||
Context not available. | |||||
974 | if (row < (int)m_allClips.size()) { | 976 | if (row < (int)m_allClips.size()) { | ||
975 | return -1; | 977 | return -1; | ||
976 | } | 978 | } | ||
977 | // Q_ASSERT(row <= (int)m_allClips.size() + m_allCompositions.size()); | 979 | Q_ASSERT(row < (int)m_allClips.size() + m_allCompositions.size()); | ||
978 | auto it = m_allCompositions.cbegin(); | 980 | auto it = m_allCompositions.cbegin(); | ||
979 | std::advance(it, row - (int)m_allClips.size()); | 981 | std::advance(it, row - (int)m_allClips.size()); | ||
980 | return (*it).first; | 982 | return (*it).first; | ||
Context not available. |