- if (dialog->exec() == QDialog::Accepted)
- render->saveZone(url->url(), edit->text(), zone);
+ if (dialog->exec() == QDialog::Accepted) {
+ if (QFile::exists(url->url().path())) {
+ if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", url->url().path())) == KMessageBox::No) {
+ slotSaveZone(render, zone, baseClip, url->url());
+ return;
+ }
+ }
+ if (baseClip && !baseClip->fileURL().isEmpty()) {
+ // create zone from clip url, so that we don't have problems with proxy clips
+ QProcess::startDetached(KdenliveSettings::rendererpath(), QStringList() << baseClip->fileURL().path() << "in=" + QString::number(zone.x()) << "out=" + QString::number(zone.y()) << "-consumer" << "xml:" + url->url().path());
+ }
+ else render->saveZone(url->url(), edit->text(), zone);
+ }