Only do double redraw if there is a component we need to get rid of

This commit is contained in:
Toby Zerner 2015-05-23 08:35:12 +09:30
parent 25ca1135b2
commit e86b796fa4

View File

@ -218,8 +218,10 @@ class Composer extends Component {
// old composer will remain. To prevent this from happening, we clear the
// component and force a redraw, so that the new component will be working
// on a blank slate.
this.component = null;
m.redraw(true);
if (this.component) {
this.clear();
m.redraw(true);
}
this.component = component;
}
}