Refactoring.
This commit is contained in:
parent
35c99ddf3c
commit
34ed181558
|
@ -2233,24 +2233,26 @@ void VPMainWindow::RotatePiecesToGrainline()
|
||||||
QList<VPSheetPtr> const sheets = m_layout->GetAllSheets();
|
QList<VPSheetPtr> const sheets = m_layout->GetAllSheets();
|
||||||
for (const auto &sheet : sheets)
|
for (const auto &sheet : sheets)
|
||||||
{
|
{
|
||||||
if (not sheet.isNull())
|
if (sheet.isNull())
|
||||||
{
|
{
|
||||||
QList<VPPiecePtr> const pieces = sheet->GetPieces();
|
continue;
|
||||||
for (const auto &piece : pieces)
|
}
|
||||||
|
|
||||||
|
QList<VPPiecePtr> const pieces = sheet->GetPieces();
|
||||||
|
for (const auto &piece : pieces)
|
||||||
|
{
|
||||||
|
if (not piece.isNull() && piece->IsGrainlineEnabled())
|
||||||
{
|
{
|
||||||
if (not piece.isNull() && piece->IsGrainlineEnabled())
|
QT_WARNING_PUSH
|
||||||
{
|
QT_WARNING_DISABLE_GCC("-Wnoexcept")
|
||||||
QT_WARNING_PUSH
|
|
||||||
QT_WARNING_DISABLE_GCC("-Wnoexcept")
|
|
||||||
|
|
||||||
VPTransformationOrigon origin;
|
VPTransformationOrigon origin;
|
||||||
origin.custom = true;
|
origin.custom = true;
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
piece->RotateToGrainline(origin);
|
piece->RotateToGrainline(origin);
|
||||||
emit m_layout->PieceTransformationChanged(piece);
|
emit m_layout->PieceTransformationChanged(piece);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user