Commit 30858289 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Restore file in model when renaming failed.

parent 7dd723d8
......@@ -170,6 +170,12 @@ public:
*/
bool rmdir(const QModelIndex& index) const;
/**
* Initialize tagged file for model index.
* @param index model index
*/
void initTaggedFileData(const QModelIndex& index);
/**
* Get tagged file data of model index.
*
......@@ -277,12 +283,6 @@ private:
*/
void clearTaggedFileStore();
/**
* Initialize tagged file for model index.
* @param index model index
*/
void initTaggedFileData(const QModelIndex& index);
QHash<QPersistentModelIndex, TaggedFile*> m_taggedFiles;
QSet<QPersistentModelIndex> m_filteredOut;
TaggedFileIconProvider* m_iconProvider;
......
......@@ -1925,6 +1925,7 @@ void Kid3MainWindow::renameFile()
i18n("Error while renaming:\n") +
i18n("Rename %1 to %2 failed\n").arg(fileName).arg(newFileName),
QMessageBox::Ok, Qt::NoButton);
model->initTaggedFileData(index);
}
}
}
......
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