X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.cpp;h=20ab1d4b3c6e23fb888cbec8a7b87423bad806e1;hb=05d5da65489ab125958e4f62ded8987bcf4989aa;hp=0a311341f15bff190a1d2f5ecb9080bf17055df1;hpb=43f46c895d2a8a0c2c7b2c3fefb7c223a28de110;p=kdenlive diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 0a311341..20ab1d4b 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -86,7 +86,7 @@ ProjectList::ProjectList(QWidget *parent) : layout->addWidget(m_toolbar); layout->addWidget(m_listView); setLayout(layout); - + connect(m_listView, SIGNAL(itemSelectionChanged()), this, SLOT(slotClipSelected())); @@ -619,15 +619,20 @@ void ProjectList::slotAddClip(const QList givenList, QString group) m_doc->slotAddClipList(list, group, groupId); } -void ProjectList::slotRemoveInvalidClip(const QString &id) +void ProjectList::slotRemoveInvalidClip(const QString &id, bool replace) { ProjectItem *item = getItemById(id); if (item) { const QString path = item->referencedClip()->fileURL().path(); - if (!path.isEmpty()) KMessageBox::sorry(this, i18n("Clip %1
is invalid, will be removed from project.", path)); + if (!path.isEmpty()) { + if (replace) KMessageBox::sorry(this, i18n("Clip %1
is invalid, will be removed from project.", path)); + else { + if (KMessageBox::questionYesNo(this, i18n("Clip %1
is missing or invalid. Remove it from project?", path), i18n("Invalid clip")) == KMessageBox::Yes) replace = true; + } + } QList ids; ids << id; - m_doc->deleteProjectClip(ids); + if (replace) m_doc->deleteProjectClip(ids); } if (!m_infoQueue.isEmpty()) QTimer::singleShot(300, this, SLOT(slotProcessNextClipInQueue())); else m_listView->setEnabled(true);