mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +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;
|
mTrackUpdated = false;
|
||||||
mMouseDownX = mInputState.x;
|
mMouseDownX = mInputState.x;
|
||||||
mMouseDownY = mInputState.y;
|
mMouseDownY = mInputState.y;
|
||||||
|
mMouseDownPiece = nullptr;
|
||||||
lcTool Tool = GetCurrentTool();
|
lcTool Tool = GetCurrentTool();
|
||||||
|
|
||||||
switch (Tool)
|
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);
|
lcMatrix44 NewPosition = GetPieceInsertPosition(true, mMouseDownPiece);
|
||||||
lcVector3 Distance = NewPosition.GetTranslation() - mMouseDownPosition;
|
lcVector3 Distance = NewPosition.GetTranslation() - mMouseDownPosition;
|
||||||
|
|
Loading…
Add table
Reference in a new issue