Yanfly Window_BattleStatus : refresh faces

Hey,

I am using the Yanfly Window_BattleStatus, which add actor faces in the battle status window.

I am also using an in-battle Party switch, which allows to switch actors during battle by adding a command.

My issue is that whenever I switch characters, the face of the replaced character still remains under the new one. The face of the new character is displayed above the face of the replaced character without removing it.

I am trying to figure how to do remove it but I have not managed to until now.

Apparently I can't find how to "dispose" those face bitmaps and I can't find any rgss-like 'clear' command.

This is the code for drawing faces :
Code:
Window_BattleStatus.prototype.drawStatusFace = function(index) {
   var actor = $gameParty.battleMembers()[index];
   var rect = this.itemRect(index);
   var ww = Math.min(rect.width - 8, Window_Base._faceWidth);
   var wh = Math.min(rect.height - 8, Window_Base._faceHeight);
   var wx = rect.x + rect.width - ww - 6;
   var wy = rect.y + 4;
   this.drawActorFace(actor, wx+3, wy, ww-1.5, wh-30);
};

Window_BattleStatus.prototype.drawFace = function(fn, fi, x, y, width, height) {
   width = width || Window_Base._faceWidth;
   height = height || Window_Base._faceHeight;
   var bitmap = ImageManager.loadFace(fn);         //+"B");
   var pw = Window_Base._faceWidth;
   var ph = Window_Base._faceHeight;
   var sw = Math.min(width, pw);
   var sh = Math.min(height, ph);
   var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
   var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
   var sx = fi % 4 * pw + (pw - sw) / 2;
   var sy = Math.floor(fi / 4) * ph + (ph - sh) / 2;
   this._faceContents.bitmap.blt(bitmap, sx, sy+12, sw, sh-25 , dx, dy);
};

Now my question is how to manually or auto remove those faces when I am switching actors in-battle ?
Thank you for any help.

I've moved this thread to Plugin Support. Thank you.

I added the Yanfly Battle Status Window Plugin, then added a troop event on turn 1 that removes a party member and adds a new one, and the faces redraw without issue, so I'm unable to recreate the issue with just the Yanfly Battle Status Window Plugin. It would be helpful to know which Plugin you're using to switch Actors in battle and what command you're using to do so.

That being said, most everything that has a Canvas element added to it has a contents.clear() method, so perhaps
Code:
this._faceContents.clear();
might work. It's hard to say without being able to reproduce the issue, though.
Hey,

Thanks to you I figured out it was caused by another plugin.
The reason is beyong me, though.

The plugin SRD_SuperToolsEngine (a better debugger...) was responsible for this. How this happens remains mysterious (i have not investigated), I just disabled this (was not using it anyway).

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-window_battlestatus-refresh-faces.104963/