summaryrefslogtreecommitdiffstats
path: root/actormodel.cpp
diff options
context:
space:
mode:
authoram <am@f440f766-f032-0410-8965-dc7d17de2ca0>2009-11-22 10:53:31 +0000
committeram <am@f440f766-f032-0410-8965-dc7d17de2ca0>2009-11-22 10:53:31 +0000
commit4892028472a640c2fabb5fb1897b92f78cfc14fc (patch)
tree735034afd3b4de13a5705eabfe2ddb35888c3e10 /actormodel.cpp
parent467667fea24e099eef26271abd4d53ff1916792f (diff)
downloadSheMov-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
Diffstat (limited to 'actormodel.cpp')
-rw-r--r--actormodel.cpp7
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();
}