diff options
author | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-11-22 10:53:31 +0000 |
---|---|---|
committer | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-11-22 10:53:31 +0000 |
commit | 4892028472a640c2fabb5fb1897b92f78cfc14fc (patch) | |
tree | 735034afd3b4de13a5705eabfe2ddb35888c3e10 | |
parent | 467667fea24e099eef26271abd4d53ff1916792f (diff) | |
download | SheMov-4892028472a640c2fabb5fb1897b92f78cfc14fc.tar.gz SheMov-4892028472a640c2fabb5fb1897b92f78cfc14fc.tar.bz2 SheMov-4892028472a640c2fabb5fb1897b92f78cfc14fc.zip |
-fixed small bug in actormodel
git-svn-id: file:///var/svn/repos2/shemov/trunk@426 f440f766-f032-0410-8965-dc7d17de2ca0
-rw-r--r-- | actormodel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actormodel.cpp b/actormodel.cpp index 3f07f3d..14edcf8 100644 --- a/actormodel.cpp +++ b/actormodel.cpp @@ -101,10 +101,17 @@ bool ActorModel::removeItem(const QVariant &data){ return false; } bool retval = removeRows(idx.row(), 1, QModelIndex()); + if(retval){ + int lidx = mItems.indexOf(data.toString()); + if(lidx != -1){ + mItems.removeAt(lidx); + } + } return retval; } void ActorModel::clear() { removeRows(0, mItems.size(), QModelIndex()); + mItems.clear(); } |