Changeset View
Changeset View
Standalone View
Standalone View
src/timeline2/model/trackmodel.cpp
Context not available. | |||||
337 | auto operation = requestClipDeletion_lambda(clipId, updateView, finalMove); | 337 | auto operation = requestClipDeletion_lambda(clipId, updateView, finalMove); | ||
---|---|---|---|---|---|
338 | if (operation()) { | 338 | if (operation()) { | ||
339 | if (updateView) { | 339 | if (updateView) { | ||
340 | //qDebug()<<"xxxxxxxxxxxxxxxxx\npreparing delete ix: "<<sourceIndex.parent()<<"\nxxxxxx"; | ||||
340 | list.emplace_back(std::make_shared<DeleteUpdate>(clipId, m_parent, getId(), old_position, true)); | 341 | list.emplace_back(std::make_shared<DeleteUpdate>(clipId, m_parent, getId(), old_position, true)); | ||
341 | } | 342 | } | ||
342 | auto reverse = requestClipInsertion_lambda(clipId, old_position, updateView, finalMove); | 343 | 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); | 382 | other_index = m_playlists[other_track].get_clip_index_at(last_pos); | ||
382 | index--; | 383 | index--; | ||
383 | } | 384 | } | ||
384 | if (index < 0) return 0; | 385 | if (index < 0) { | ||
386 | return 0; | ||||
387 | } | ||||
385 | int length = INT_MAX; | 388 | int length = INT_MAX; | ||
386 | if (index < m_playlists[track].count()) { | 389 | if (index < m_playlists[track].count()) { | ||
387 | if (!m_playlists[track].is_blank(index)) { | 390 | if (!m_playlists[track].is_blank(index)) { | ||
Context not available. | |||||
441 | 444 | | |||
442 | auto update_snaps = [clipId, old_in, old_out, checkRefresh, this](int new_in, int new_out) { | 445 | auto update_snaps = [clipId, old_in, old_out, checkRefresh, this](int new_in, int new_out) { | ||
443 | if (auto ptr = m_parent.lock()) { | 446 | if (auto ptr = m_parent.lock()) { | ||
447 | qDebug()<<"* * *MOVING SNAP POINTS: "<<old_in<<"-"<<old_out<<", TO: "<<new_in<<"-"<<new_out; | ||||
444 | ptr->m_snaps->removePoint(old_in); | 448 | ptr->m_snaps->removePoint(old_in); | ||
445 | ptr->m_snaps->removePoint(old_out); | 449 | ptr->m_snaps->removePoint(old_out); | ||
446 | ptr->m_snaps->addPoint(new_in); | 450 | ptr->m_snaps->addPoint(new_in); | ||
Context not available. | |||||
974 | if (row < (int)m_allClips.size()) { | 978 | if (row < (int)m_allClips.size()) { | ||
975 | return -1; | 979 | return -1; | ||
976 | } | 980 | } | ||
977 | // Q_ASSERT(row <= (int)m_allClips.size() + m_allCompositions.size()); | 981 | Q_ASSERT(row < (int)m_allClips.size() + m_allCompositions.size()); | ||
978 | auto it = m_allCompositions.cbegin(); | 982 | auto it = m_allCompositions.cbegin(); | ||
979 | std::advance(it, row - (int)m_allClips.size()); | 983 | std::advance(it, row - (int)m_allClips.size()); | ||
980 | return (*it).first; | 984 | return (*it).first; | ||
Context not available. |