Commit 78ff685f authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove replace current document drop action.

parent 32d3842e
......@@ -454,19 +454,15 @@ void KisView::dropEvent(QDropEvent *event)
QAction *openInNewDocument = new KAction(i18n("Open in New Document"), &popup);
QAction *openManyDocuments = new KAction(i18n("Open Many Documents"), &popup);
QAction *replaceCurrentDocument = new KAction(i18n("Replace Current Document"), &popup);
QAction *cancel = new KAction(i18n("Cancel"), &popup);
popup.addAction(insertAsNewLayer);
popup.addAction(openInNewDocument);
popup.addAction(replaceCurrentDocument);
popup.addAction(insertManyLayers);
popup.addAction(openManyDocuments);
insertAsNewLayer->setEnabled(image() && urls.count() == 1);
openInNewDocument->setEnabled(urls.count() == 1);
replaceCurrentDocument->setEnabled(image() && urls.count() == 1);
insertManyLayers->setEnabled(image() && urls.count() > 1);
openManyDocuments->setEnabled(urls.count() > 1);
......@@ -482,20 +478,7 @@ void KisView::dropEvent(QDropEvent *event)
d->viewManager->imageManager()->importImage(KUrl(url));
activateWindow();
}
else if (action == replaceCurrentDocument) {
if (d->document->isModified()) {
d->document->save();
}
if (mainWindow() != 0) {
/**
* NOTE: this is effectively deferred self-destruction
*/
connect(mainWindow(), SIGNAL(loadCompleted()),
mainWindow(), SLOT(close()));
mainWindow()->openDocument(url);
}
} else {
else {
Q_ASSERT(action == openInNewDocument || action == openManyDocuments);
if (mainWindow()) {
mainWindow()->openDocument(url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment