mirror of
https://github.com/leozide/leocad
synced 2025-01-26 19:58:08 +01:00
Fixed crash using the old move tool.
This commit is contained in:
parent
470be6b7a9
commit
2e6fbd0679
1 changed files with 2 additions and 1 deletions
|
@ -2315,6 +2315,7 @@ void View::StartTracking(lcTrackButton TrackButton)
|
|||
mTrackUpdated = false;
|
||||
mMouseDownX = mInputState.x;
|
||||
mMouseDownY = mInputState.y;
|
||||
mMouseDownPiece = nullptr;
|
||||
lcTool Tool = GetCurrentTool();
|
||||
|
||||
switch (Tool)
|
||||
|
@ -2788,7 +2789,7 @@ void View::OnMouseMove()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (mTrackTool == LC_TRACKTOOL_MOVE_XYZ)
|
||||
else if (mTrackTool == LC_TRACKTOOL_MOVE_XYZ && mMouseDownPiece)
|
||||
{
|
||||
lcMatrix44 NewPosition = GetPieceInsertPosition(true, mMouseDownPiece);
|
||||
lcVector3 Distance = NewPosition.GetTranslation() - mMouseDownPosition;
|
||||
|
|
Loading…
Add table
Reference in a new issue