mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Zoom extents after importing a file.
This commit is contained in:
parent
1daef622cb
commit
a97824ba62
1 changed files with 5 additions and 3 deletions
|
@ -978,7 +978,7 @@ void Project::FileReadLDraw(lcFile* file, const lcMatrix44& CurrentTransform, in
|
|||
continue;
|
||||
|
||||
lcMatrix44 IncludeTransform(lcVector4(fmat[3], fmat[9], -fmat[6], 0.0f), lcVector4(fmat[5], fmat[11], -fmat[8], 0.0f),
|
||||
lcVector4(-fmat[4], -fmat[10], fmat[7], 0.0f), lcVector4(fmat[0], fmat[2], -fmat[1], 0.0f));
|
||||
lcVector4(-fmat[4], -fmat[10], fmat[7], 0.0f), lcVector4(fmat[0], fmat[2], -fmat[1], 1.0f));
|
||||
|
||||
IncludeTransform = lcMul(IncludeTransform, CurrentTransform);
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ void Project::FileReadLDraw(lcFile* file, const lcMatrix44& CurrentTransform, in
|
|||
lcVector4 AxisAngle = lcMatrix44ToAxisAngle(IncludeTransform);
|
||||
AxisAngle[3] *= LC_RTOD;
|
||||
|
||||
pPiece->Initialize(IncludeTransform[3].x, IncludeTransform[3].y, IncludeTransform[3].z, *nStep, 1);
|
||||
pPiece->Initialize(IncludeTransform[3].x / 25.0f, IncludeTransform[3].y / 25.0f, IncludeTransform[3].z / 25.0f, *nStep, 1);
|
||||
pPiece->SetColorCode(cl);
|
||||
pPiece->CreateName(m_pPieces);
|
||||
AddPiece(pPiece);
|
||||
|
@ -1394,7 +1394,9 @@ bool Project::OnOpenDocument (const char* lpszPathName)
|
|||
SystemUpdateFocus(NULL);
|
||||
UpdateSelection();
|
||||
CalculateStep();
|
||||
UpdateAllViews ();
|
||||
|
||||
HandleCommand(LC_VIEW_ZOOMEXTENTS, 0);
|
||||
UpdateAllViews();
|
||||
|
||||
console.PrintMisc("%d objects imported.\n", ok);
|
||||
bSuccess = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue