isEmpty test of graphic piece
This commit is contained in:
parent
02b21d818f
commit
ed3022ae51
|
@ -74,22 +74,30 @@ void VPuzzleGraphicsPiece::Init()
|
||||||
|
|
||||||
// initialises the seam line
|
// initialises the seam line
|
||||||
QVector<QPointF> seamLinePoints = m_piece->GetSeamLine();
|
QVector<QPointF> seamLinePoints = m_piece->GetSeamLine();
|
||||||
m_seamLine.moveTo(seamLinePoints.first());
|
if(!seamLinePoints.isEmpty())
|
||||||
for (int i = 1; i < seamLinePoints.size(); ++i)
|
{
|
||||||
m_seamLine.lineTo(seamLinePoints.at(i));
|
m_seamLine.moveTo(seamLinePoints.first());
|
||||||
|
for (int i = 1; i < seamLinePoints.size(); ++i)
|
||||||
|
m_seamLine.lineTo(seamLinePoints.at(i));
|
||||||
|
}
|
||||||
|
|
||||||
// initiliases the cutting line
|
// initiliases the cutting line
|
||||||
QVector<QPointF> cuttingLinepoints = m_piece->GetCuttingLine();
|
QVector<QPointF> cuttingLinepoints = m_piece->GetCuttingLine();
|
||||||
m_cuttingLine.moveTo(cuttingLinepoints.first());
|
if(!cuttingLinepoints.isEmpty())
|
||||||
for (int i = 1; i < cuttingLinepoints.size(); ++i)
|
{
|
||||||
m_cuttingLine.lineTo(cuttingLinepoints.at(i));
|
m_cuttingLine.moveTo(cuttingLinepoints.first());
|
||||||
|
for (int i = 1; i < cuttingLinepoints.size(); ++i)
|
||||||
|
m_cuttingLine.lineTo(cuttingLinepoints.at(i));
|
||||||
|
}
|
||||||
|
|
||||||
// initialises the grainline
|
// initialises the grainline
|
||||||
QVector<QPointF> grainLinepoints = m_piece->GetGrainline();
|
QVector<QPointF> grainLinepoints = m_piece->GetGrainline();
|
||||||
m_grainline.moveTo(grainLinepoints.first());
|
if(!grainLinepoints.isEmpty())
|
||||||
for (int i = 1; i < grainLinepoints.size(); ++i)
|
{
|
||||||
m_grainline.lineTo(grainLinepoints.at(i));
|
m_grainline.moveTo(grainLinepoints.first());
|
||||||
|
for (int i = 1; i < grainLinepoints.size(); ++i)
|
||||||
|
m_grainline.lineTo(grainLinepoints.at(i));
|
||||||
|
}
|
||||||
|
|
||||||
// TODO : initialises the other elements labels, passmarks etc.
|
// TODO : initialises the other elements labels, passmarks etc.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user