Refactoring.

Code style.
This commit is contained in:
Roman Telezhynskyi 2023-07-08 10:33:08 +03:00
parent 83c914f47d
commit 3e2a44d2ab

View File

@ -31,7 +31,6 @@
#include <QCheckBox> #include <QCheckBox>
#include <QVector> #include <QVector>
#include "../ifc/ifcdef.h"
#include "../vpatterndb/vcontainer.h" #include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vpiece.h" #include "../vpatterndb/vpiece.h"
#include "../vpatterndb/vpiecenode.h" #include "../vpatterndb/vpiecenode.h"
@ -45,16 +44,16 @@
* @param parent parent widget * @param parent parent widget
*/ */
DialogUnionDetails::DialogUnionDetails(const VContainer *data, quint32 toolId, QWidget *parent) DialogUnionDetails::DialogUnionDetails(const VContainer *data, quint32 toolId, QWidget *parent)
: DialogTool(data, toolId, parent), : DialogTool(data, toolId, parent),
ui(new Ui::DialogUnionDetails), ui(new Ui::DialogUnionDetails),
indexD1(0), indexD1(0),
indexD2(0), indexD2(0),
d1(NULL_ID), d1(NULL_ID),
d2(NULL_ID), d2(NULL_ID),
numberD(0), numberD(0),
numberP(0), numberP(0),
p1(NULL_ID), p1(NULL_ID),
p2(NULL_ID) p2(NULL_ID)
{ {
ui->setupUi(this); ui->setupUi(this);
InitOkCancel(ui); InitOkCancel(ui);
@ -114,15 +113,9 @@ auto DialogUnionDetails::CheckDetail(const quint32 &idDetail) const -> bool
{ {
return false; return false;
} }
const VPiece det = data->GetPiece(idDetail); const VPiece det = data->GetPiece(idDetail);
if (det.GetPath().CountNodes() >= 3 && det.GetPath().ListNodePoint().size() >= 2) return det.GetPath().CountNodes() >= 3 && det.GetPath().ListNodePoint().size() >= 2;
{
return true;
}
else
{
return false;
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -133,8 +126,7 @@ auto DialogUnionDetails::CheckDetail(const quint32 &idDetail) const -> bool
* @param idDetail id detail * @param idDetail id detail
* @param index index of edge * @param index index of edge
*/ */
void DialogUnionDetails::ChoosedDetail(const quint32 &id, const SceneObject &type, quint32 &idDetail, void DialogUnionDetails::ChoosedDetail(const quint32 &id, const SceneObject &type, quint32 &idDetail, vsizetype &index)
vsizetype &index)
{ {
if (idDetail == NULL_ID) if (idDetail == NULL_ID)
{ {