Browse Source

Attempt to fix NullReference exception

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4345 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
bbcc95f3d0
  1. 4
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindowBase.cs

4
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindowBase.cs

@ -249,7 +249,7 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion @@ -249,7 +249,7 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion
Point locationTop = textView.PointToScreen(visualLocationTop - textView.ScrollOffset);
// Let's use device dependent units for everything
Size completionWindowSize = new Size(this.ActualWidth, this.ActualHeight).TransformToDevice(this);
Size completionWindowSize = new Size(this.ActualWidth, this.ActualHeight).TransformToDevice(textView);
Rect bounds = new Rect(location, completionWindowSize);
Rect workingScreen = System.Windows.Forms.Screen.GetWorkingArea(location.ToSystemDrawing()).ToWpf();
if (!workingScreen.Contains(bounds)) {
@ -266,7 +266,7 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion @@ -266,7 +266,7 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion
}
}
// Convert the window bounds to device independent units
bounds = bounds.TransformFromDevice(this);
bounds = bounds.TransformFromDevice(textView);
this.Left = bounds.X;
this.Top = bounds.Y;
}

Loading…
Cancel
Save