summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}