osdWindow: Don't tween to undefined
Check that we got a valid level before setting the level bar to it, to prevent a Tweener warning.
This commit is contained in:
parent
7051411be7
commit
7101cc3170
@ -125,13 +125,15 @@ const OsdWindow = new Lang.Class({
|
||||
|
||||
setLevel: function(level) {
|
||||
this._level.actor.visible = (level != undefined);
|
||||
if (this.actor.visible)
|
||||
Tweener.addTween(this._level,
|
||||
{ level: level,
|
||||
time: LEVEL_ANIMATION_TIME,
|
||||
transition: 'easeOutQuad' });
|
||||
else
|
||||
this._level.level = level;
|
||||
if (level) {
|
||||
if (this.actor.visible)
|
||||
Tweener.addTween(this._level,
|
||||
{ level: level,
|
||||
time: LEVEL_ANIMATION_TIME,
|
||||
transition: 'easeOutQuad' });
|
||||
else
|
||||
this._level.level = level;
|
||||
}
|
||||
},
|
||||
|
||||
show: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user