Fixed crash pasting.

This commit is contained in:
Leonardo 2016-12-31 06:36:49 -08:00
parent 38be0becb3
commit fcf4b24d84
2 changed files with 6 additions and 4 deletions

6
.gitignore vendored
View file

@ -12,6 +12,9 @@
*.suo
*.vspx
*.xcodeproj
*.qm
*.ldr
*.dat
build
debug
release
@ -19,5 +22,4 @@ ipch
Makefile
library.bin
leocad_plugin_import.cpp
*.qm
/uic_wrapper.bat
uic_wrapper.bat

View file

@ -1031,8 +1031,8 @@ void lcModel::Paste()
Merge(Model);
SaveCheckpoint(tr("Pasting"));
if (PastedPieces.GetSize() == 1)
ClearSelectionAndSetFocus(PastedPieces[0], LC_PIECE_SECTION_POSITION);
if (SelectedObjects.GetSize() == 1)
ClearSelectionAndSetFocus(SelectedObjects[0], LC_PIECE_SECTION_POSITION);
else
SetSelectionAndFocus(SelectedObjects, NULL, 0);