Warn the main window about a layout change.

This commit is contained in:
Roman Telezhynskyi 2021-08-30 18:45:00 +03:00
parent 9ceabab131
commit 3d9a4f6f65
6 changed files with 12 additions and 1 deletions

View File

@ -80,6 +80,7 @@ void VPUndoAddSheet::redo()
layout->AddSheet(sheet); layout->AddSheet(sheet);
emit layout->SheetListChanged(); emit layout->SheetListChanged();
layout->SetFocusedSheet(sheet); layout->SetFocusedSheet(sheet);
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -123,6 +123,7 @@ void VPUndoMovePieceOnSheet::redo()
{ {
emit layout->PieceSheetChanged(piece); emit layout->PieceSheetChanged(piece);
emit layout->PieceTransformationChanged(piece); emit layout->PieceTransformationChanged(piece);
emit layout->LayoutChanged();
} }
} }
} }

View File

@ -90,6 +90,7 @@ void VPUndoOriginMove::redo()
sheet->SetTransformationOrigin(m_origin); sheet->SetTransformationOrigin(m_origin);
emit layout->TransformationOriginChanged(); emit layout->TransformationOriginChanged();
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -90,6 +90,7 @@ void VPUndoPieceMove::redo()
piece->Translate(m_dx, m_dy); piece->Translate(m_dx, m_dy);
emit layout->PieceTransformationChanged(piece); emit layout->PieceTransformationChanged(piece);
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -204,6 +205,8 @@ void VPUndoPiecesMove::redo()
emit layout->PieceTransformationChanged(p); emit layout->PieceTransformationChanged(p);
} }
} }
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -132,6 +132,8 @@ void VPUndoPieceRotate::redo()
{ {
m_firstCall = false; m_firstCall = false;
} }
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -279,6 +281,8 @@ void VPUndoPiecesRotate::redo()
{ {
m_firstCall = false; m_firstCall = false;
} }
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -111,10 +111,11 @@ void VPUndoRemoveSheet::redo()
emit layout->SheetListChanged(); emit layout->SheetListChanged();
layout->SetFocusedSheet(VPSheetPtr()); layout->SetFocusedSheet(VPSheetPtr());
emit layout->LayoutChanged();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
int VPUndoRemoveSheet::id() const auto VPUndoRemoveSheet::id() const -> int
{ {
return static_cast<int>(ML::UndoCommand::RemoveSheet); return static_cast<int>(ML::UndoCommand::RemoveSheet);
} }