summaryrefslogtreecommitdiff
path: root/dgedit/filelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dgedit/filelist.cc')
-rw-r--r--dgedit/filelist.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/dgedit/filelist.cc b/dgedit/filelist.cc
index 29a12c2..00d7d87 100644
--- a/dgedit/filelist.cc
+++ b/dgedit/filelist.cc
@@ -155,8 +155,12 @@ QString FileList::itemName(QListWidgetItem *i)
void FileList::setItemName(QListWidgetItem *i, QString name)
{
+ QString oldname = itemName(i);
+
i->setData(Qt::UserRole, name);
i->setData(Qt::DisplayRole, name + "\t" + itemFile(i));
+
+ if(oldname != "" && oldname != name) emit nameChanged(itemFile(i), name);
}
void FileList::setItemMaster(QListWidgetItem *i, bool master)