mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Make sure pasted pieces are added at the current step or later.
This commit is contained in:
parent
406182db5d
commit
39ef058aaa
1 changed files with 13 additions and 1 deletions
|
@ -890,10 +890,22 @@ void lcModel::Paste()
|
|||
|
||||
lcArray<lcPiece*> PastedPieces = Model->mPieces;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < PastedPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
lcPiece* Piece = PastedPieces[PieceIdx];
|
||||
lcStep Step = Piece->GetStepShow();
|
||||
|
||||
if (Step > mCurrentStep)
|
||||
Piece->SetStepShow(mCurrentStep);
|
||||
}
|
||||
|
||||
Merge(Model);
|
||||
SaveCheckpoint(tr("Pasting"));
|
||||
|
||||
SetSelectionAndFocus((lcArray<lcObject*>&)PastedPieces, NULL, 0);
|
||||
if (PastedPieces.GetSize() == 1)
|
||||
ClearSelectionAndSetFocus(PastedPieces[0], LC_PIECE_SECTION_POSITION);
|
||||
else
|
||||
SetSelectionAndFocus((lcArray<lcObject*>&)PastedPieces, NULL, 0);
|
||||
|
||||
CalculateStep(mCurrentStep);
|
||||
gMainWindow->UpdateTimeline(false);
|
||||
|
|
Loading…
Reference in a new issue