X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4f3e1b0c24e8150cc940cadc754b4d703bbac26a..6861a876830e301878b65cb4e4574bfda4c73340:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 18ffe0a27..0b04d0afa 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -796,8 +796,8 @@ void DolphinView::dropUrls(const KUrl::List& urls, const KFileItem& destItem) { Q_ASSERT(!urls.isEmpty()); - const KUrl& destination = !destItem.isNull() && destItem.isDir() ? - destItem.url() : destPath; + const KUrl destination = !destItem.isNull() && destItem.isDir() ? + destItem.url() : destPath; const KUrl sourceDir = KUrl(urls.first().directory()); if (sourceDir != destination) { DolphinDropController dropController(this); @@ -1143,6 +1143,12 @@ void DolphinView::deleteView() { QAbstractItemView* view = itemView(); if (view != 0) { + // It's important to set the keyboard focus to the parent + // before deleting the view: Otherwise when having a split + // view the other view will get the focus and will request + // an activation (see DolphinView::eventFilter()). + setFocus(); + m_topLayout->removeWidget(view); view->close(); view->deleteLater();