Skip to content

Commit a79d4db

Browse files
committed
Fix bug where the text layer was set too late for SetPageTextLayerImmediate()
1 parent 7075ed2 commit a79d4db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Caly.Core/Services/PdfPigPdfService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ public async Task SetPageTextLayerAsync(PdfPageViewModel page, CancellationToken
229229

230230
var textLayer = PdfTextLayerHelper.GetTextLayer(pageTextLayer, token);
231231

232-
Dispatcher.UIThread.Post(() => page.PdfTextLayer = textLayer);
232+
// This need to be done sync for SetPageTextLayerImmediate()
233+
Dispatcher.UIThread.Invoke(() => page.PdfTextLayer = textLayer);
233234
}
234235

235236
if (page.PdfTextLayer is not null)

0 commit comments

Comments
 (0)