mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Fixed uninitialized grid size in some cases.
This commit is contained in:
parent
343ed3a1fd
commit
6f3694fb89
2 changed files with 5 additions and 3 deletions
|
@ -2561,9 +2561,6 @@ bool lcModel::GetSelectionCenter(lcVector3& Center) const
|
|||
|
||||
bool lcModel::GetPiecesBoundingBox(float BoundingBox[6], bool IncludeHidden) const
|
||||
{
|
||||
if (mPieces.IsEmpty())
|
||||
return false;
|
||||
|
||||
BoundingBox[0] = FLT_MAX;
|
||||
BoundingBox[1] = FLT_MAX;
|
||||
BoundingBox[2] = FLT_MAX;
|
||||
|
@ -2571,6 +2568,9 @@ bool lcModel::GetPiecesBoundingBox(float BoundingBox[6], bool IncludeHidden) con
|
|||
BoundingBox[4] = -FLT_MAX;
|
||||
BoundingBox[5] = -FLT_MAX;
|
||||
|
||||
if (mPieces.IsEmpty())
|
||||
return false;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "lc_mainwindow.h"
|
||||
#include "view.h"
|
||||
#include "project.h"
|
||||
#include "lc_colors.h"
|
||||
#include <QApplication>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -182,6 +183,7 @@ int main(int argc, char *argv[])
|
|||
lcQMainWindow w;
|
||||
gMainWindow->mHandle = &w;
|
||||
lcGetActiveModel()->UpdateInterface();
|
||||
gMainWindow->SetColorIndex(lcGetColorIndex(4));
|
||||
gMainWindow->UpdateRecentFiles();
|
||||
w.show();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue