diff --git a/app/fileoperations.h b/app/fileoperations.h --- a/app/fileoperations.h +++ b/app/fileoperations.h @@ -40,7 +40,7 @@ void linkTo(const QList& urlList, QWidget* parent, ContextManager* contextManager); void trash(const QList& urlList, QWidget* parent); void del(const QList& urlList, QWidget* parent); -void rename(const QUrl &url, QWidget* parent); +void rename(const QUrl &url, QWidget* parent, ContextManager* contextManager); void showMenuForDroppedUrls(QWidget* parent, const QList& urlList, const QUrl &destUrl); diff --git a/app/fileoperations.cpp b/app/fileoperations.cpp --- a/app/fileoperations.cpp +++ b/app/fileoperations.cpp @@ -222,7 +222,7 @@ KJobWidgets::setWindow(job, parent); } -void rename(const QUrl &oldUrl, QWidget* parent) +void rename(const QUrl &oldUrl, QWidget* parent, ContextManager* contextManager) { const DialogGuard dialog(parent); dialog->setFilename(oldUrl.fileName()); @@ -244,6 +244,7 @@ job->uiDelegate()->showErrorMessage(); return; } + contextManager->setCurrentUrl(newUrl); ThumbnailProvider::moveThumbnail(oldUrl, newUrl); } diff --git a/app/fileopscontextmanageritem.cpp b/app/fileopscontextmanageritem.cpp --- a/app/fileopscontextmanageritem.cpp +++ b/app/fileopscontextmanageritem.cpp @@ -350,7 +350,7 @@ QModelIndex index = mThumbnailView->currentIndex(); mThumbnailView->edit(index); } else { - FileOperations::rename(urlList().first(), mGroup); + FileOperations::rename(urlList().first(), mGroup, contextManager()); contextManager()->slotSelectionChanged(); } }