mirror of
https://github.com/leozide/leocad
synced 2025-02-06 08:46:06 +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,9 +890,21 @@ void lcModel::Paste()
|
||||||
|
|
||||||
lcArray<lcPiece*> PastedPieces = Model->mPieces;
|
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);
|
Merge(Model);
|
||||||
SaveCheckpoint(tr("Pasting"));
|
SaveCheckpoint(tr("Pasting"));
|
||||||
|
|
||||||
|
if (PastedPieces.GetSize() == 1)
|
||||||
|
ClearSelectionAndSetFocus(PastedPieces[0], LC_PIECE_SECTION_POSITION);
|
||||||
|
else
|
||||||
SetSelectionAndFocus((lcArray<lcObject*>&)PastedPieces, NULL, 0);
|
SetSelectionAndFocus((lcArray<lcObject*>&)PastedPieces, NULL, 0);
|
||||||
|
|
||||||
CalculateStep(mCurrentStep);
|
CalculateStep(mCurrentStep);
|
||||||
|
|
Loading…
Add table
Reference in a new issue