Working to correct some null refs
This commit is contained in:
parent
4ef7ecfeb7
commit
87bd79901a
3 changed files with 14 additions and 8 deletions
|
|
@ -349,14 +349,20 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
ZeroVelocity();
|
||||
}
|
||||
|
||||
var rayAtPosition = world.GetRayForLocalBounds(position);
|
||||
var hitAtPosition = hitPlane.GetClosestIntersection(rayAtPosition);
|
||||
if (hitPlane != null)
|
||||
{
|
||||
var rayAtPosition = world.GetRayForLocalBounds(position);
|
||||
var hitAtPosition = hitPlane.GetClosestIntersection(rayAtPosition);
|
||||
|
||||
var offset = hitAtPosition.HitPosition - mouseDownWorldPosition;
|
||||
bedCenter += offset;
|
||||
world.Translate(offset);
|
||||
if (hitAtPosition != null)
|
||||
{
|
||||
var offset = hitAtPosition.HitPosition - mouseDownWorldPosition;
|
||||
bedCenter += offset;
|
||||
world.Translate(offset);
|
||||
|
||||
Invalidate();
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ZeroVelocity()
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 16e9e5a2b5ff60df9c39d084e7820f346ac48111
|
||||
Subproject commit a2bfc7651149af674638c5925789a72acf557e23
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit ef102435a4a6250caf7599fb6a889089b46a19b7
|
||||
Subproject commit d7dec9cc62b55e5dd55655fa0456caba9f845252
|
||||
Loading…
Add table
Add a link
Reference in a new issue