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,6 +125,7 @@ const OsdWindow = new Lang.Class({
|
|||||||
|
|
||||||
setLevel: function(level) {
|
setLevel: function(level) {
|
||||||
this._level.actor.visible = (level != undefined);
|
this._level.actor.visible = (level != undefined);
|
||||||
|
if (level) {
|
||||||
if (this.actor.visible)
|
if (this.actor.visible)
|
||||||
Tweener.addTween(this._level,
|
Tweener.addTween(this._level,
|
||||||
{ level: level,
|
{ level: level,
|
||||||
@ -132,6 +133,7 @@ const OsdWindow = new Lang.Class({
|
|||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
else
|
else
|
||||||
this._level.level = level;
|
this._level.level = level;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user