Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Materials Settings::getMaterials()
QStringList colors = value(PATH_MATERIALS_COLORS).toStringList();
QStringList patterns = value(PATH_MATERIALS_PATTERNS).toStringList();

if (colors.empty() | patterns.empty()) {
if (colors.empty() || patterns.empty()) {
return restoreMaterials();
}

Expand Down
1 change: 0 additions & 1 deletion src/shape/shapeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ void ShapeView::draw(bool pick)
MaterialsList* materialsList = primitive.materialsModel->materialsList();

int material = materialsList->at(m_currentPaintJob);
QColor color;

bool selected = false, pattern = false;

Expand Down
12 changes: 6 additions & 6 deletions src/shape/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#include <QList>
#include <QVector3D>

typedef struct {
struct Vertex{
qint16 x;
qint16 y;
qint16 z;

inline QVector3D toQ() const { return QVector3D(x, y, z); }
} Vertex;
};

typedef QList<Vertex> VerticesList;

typedef struct {
struct VertexF{
float x;
float y;
float z;

inline QVector3D toQ() const { return QVector3D(x, y, z); }
} VertexF;
};

typedef QList<VertexF> VerticesFList;

Expand All @@ -29,14 +29,14 @@ typedef QList<quint8> MaterialsList;

class MaterialsModel;

typedef struct {
struct Primitive{
quint8 type;
bool twoSided;
bool zBias;
VerticesModel* verticesModel;
MaterialsModel* materialsModel;
quint32 cull1;
quint32 cull2;
} Primitive;
};

typedef QList<Primitive> PrimitivesList;