Skip to content

Commit

Permalink
libgui|Drawable: Avoid unnecessary notifications when deleting contents
Browse files Browse the repository at this point in the history
Remove the asset first from the group, then delete.
  • Loading branch information
skyjake committed Apr 27, 2013
1 parent 5a99114 commit 1a0472e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doomsday/libgui/src/drawable.cpp
Expand Up @@ -179,8 +179,8 @@ void Drawable::removeBuffer(Id id)
{
if(d->buffers.contains(id))
{
delete d->buffers[id];
d->buffers.remove(id);
remove(*d->buffers[id]);
delete d->buffers.take(id);
}
d->configs.remove(id);
}
Expand All @@ -191,8 +191,8 @@ void Drawable::removeProgram(Id id)
{
GLProgram *prog = d->programs[id];
d->replaceProgram(prog, &d->defaultProgram);
delete prog;
d->programs.remove(id);
remove(*prog);
delete d->programs.take(id);
}
}

Expand All @@ -202,8 +202,7 @@ void Drawable::removeState(Id id)
{
GLState *st = d->states[id];
d->replaceState(st, 0);
delete st;
d->states.remove(id);
delete d->states.take(id);
}
}

Expand Down

0 comments on commit 1a0472e

Please sign in to comment.