From 04d5426a518f3ca5cab8ab46e3948a8815e1b889 Mon Sep 17 00:00:00 2001 From: Martins Mozeiko Date: Sat, 4 Mar 2017 12:39:35 -0800 Subject: [PATCH] when renaming item, rename also its path fixes #30 --- src/item_model.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/item_model.cpp b/src/item_model.cpp index 6c77ee36..54fb329e 100644 --- a/src/item_model.cpp +++ b/src/item_model.cpp @@ -161,6 +161,7 @@ void ItemModel::rename(const QModelIndex& index, const QString& name) { Item* item = get(index); item->name = name; + item->path = item->parent->path.filePath(item->name); emit dataChanged(index, index, QVector{Qt::DisplayRole}); }