From 304d76f52401afd7f8e11f374cf717fc4bf2c447 Mon Sep 17 00:00:00 2001 From: Danielku15 Date: Sun, 8 Jan 2023 00:32:19 +0100 Subject: [PATCH] Ensure we do not signal the UI facade for empty partials --- src/AlphaTabApiBase.ts | 7 ++++++- src/rendering/ScoreRenderer.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/AlphaTabApiBase.ts b/src/AlphaTabApiBase.ts index 3067082c1..632f14608 100644 --- a/src/AlphaTabApiBase.ts +++ b/src/AlphaTabApiBase.ts @@ -331,8 +331,13 @@ export class AlphaTabApiBase { this._cursorWrapper.width = result.totalWidth; this._cursorWrapper.height = result.totalHeight; } + + if(result.width > 0 || result.height > 0) { + this.uiFacade.beginAppendRenderResults(result); + } + } else { + this.uiFacade.beginAppendRenderResults(result); } - this.uiFacade.beginAppendRenderResults(result); } private updateRenderResult(result: RenderFinishedEventArgs | null): void { diff --git a/src/rendering/ScoreRenderer.ts b/src/rendering/ScoreRenderer.ts index d8a0b528c..6d3ccb3aa 100644 --- a/src/rendering/ScoreRenderer.ts +++ b/src/rendering/ScoreRenderer.ts @@ -170,7 +170,7 @@ export class ScoreRenderer implements IScoreRenderer { this.onRenderFinished(); (this.postRenderFinished as EventEmitter).trigger(); } else { - Logger.warning('Rendering', 'Current layout does not support dynamic resizing, nothing was done', null); + Logger.debug('Rendering', 'Current layout does not support dynamic resizing, nothing was done', null); } Logger.debug('Rendering', 'Resize finished'); }