Skip to content
This repository has been archived by the owner on Sep 1, 2019. It is now read-only.

Commit

Permalink
when renaming item, rename also its path
Browse files Browse the repository at this point in the history
fixes #30
  • Loading branch information
mmozeiko committed Mar 4, 2017
1 parent b86e821 commit 04d5426
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/item_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>{Qt::DisplayRole});
}

Expand Down

0 comments on commit 04d5426

Please sign in to comment.