fix: 修复去水印页改变文本状态影响外部滚动容器 (#334)

This commit is contained in:
to_mo_to
2025-07-10 21:31:00 +08:00
committed by GitHub
parent 232bf4d637
commit a916681ce5

View File

@@ -278,19 +278,12 @@ public class ViewDelogoViewModel : ViewModelBase
{
return;
}
var presenter = output.GetVisualDescendants()
.OfType<TextPresenter>()
var scrollViewer = output.GetVisualDescendants()
.OfType<ScrollViewer>()
.FirstOrDefault();
if (presenter == null)
return;
int lineCount = presenter.TextLayout?.TextLines?.Count ?? 0;
if (lineCount > 0)
{
output.ScrollToLine(lineCount - 1);
}
scrollViewer?.ScrollToEnd();
}
#endregion