Merge pull request #148 from flash384/fix-invalidoperationexception
Fix System.InvalidOperationException: This Visual is not connected to…
This commit is contained in:
Коммит
6f3e9b7943
|
@ -331,6 +331,9 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion
|
|||
protected void UpdatePosition()
|
||||
{
|
||||
TextView textView = this.TextArea.TextView;
|
||||
if (PresentationSource.FromVisual(textView) == null)
|
||||
return;
|
||||
|
||||
// PointToScreen returns device dependent units (physical pixels)
|
||||
Point location = textView.PointToScreen(visualLocation - textView.ScrollOffset);
|
||||
Point locationTop = textView.PointToScreen(visualLocationTop - textView.ScrollOffset);
|
||||
|
|
Загрузка…
Ссылка в новой задаче