diff options
author | Arno <am@disconnect.de> | 2013-03-20 17:05:39 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-03-20 17:05:39 +0100 |
commit | dc603077a93b2b24d709126200e7c5ee8c1af83b (patch) | |
tree | 271f0ca799498d0692537a1c3e8f2c4ecd82b42a /smdirmodel.cpp | |
parent | 0e3076bfda34c93986c7197c4e0c35bc0860f91e (diff) | |
download | SheMov-dc603077a93b2b24d709126200e7c5ee8c1af83b.tar.gz SheMov-dc603077a93b2b24d709126200e7c5ee8c1af83b.tar.bz2 SheMov-dc603077a93b2b24d709126200e7c5ee8c1af83b.zip |
Auto resize FileView
Automatically resize FileView when it changes. I guess I was quite drunk
on the first try. Fortunately I didn't commit it :)
Diffstat (limited to 'smdirmodel.cpp')
-rw-r--r-- | smdirmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/smdirmodel.cpp b/smdirmodel.cpp index a02c47c..cf2197a 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -89,6 +89,7 @@ bool SmDirModel::setData(const QModelIndex &index, const QVariant &value, int ro QString dir = fileInfo(index).absolutePath(); QString newPath = QString("%1/%2").arg(dir).arg(newName); QFile::rename(old, newPath); + emit needResize(); } return SmTreeModel::setData(index, value, role); } @@ -136,6 +137,7 @@ void SmDirModel::dirEvent(const QString &file, int e){ setData(c, fData.at(i), Qt::EditRole); } } + emit needResize(); } void SmDirModel::readSettings(){ @@ -167,6 +169,7 @@ void SmDirModel::populate(){ root->appendChild(n); } setRoot(root); + emit needResize(); } const QList<QVariant> SmDirModel::fileData(const QFileInfo &fi) const{ |