From fcf4b24d8409264dc8444126030d48a6b66036c5 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sat, 31 Dec 2016 06:36:49 -0800 Subject: [PATCH] Fixed crash pasting. --- .gitignore | 6 ++++-- common/lc_model.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 23598582..a1501cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/common/lc_model.cpp b/common/lc_model.cpp index 86687f65..431172ea 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -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);