diff options
author | Tomi Korpipää <tomi.korpipaa@qt.io> | 2016-06-02 07:57:57 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2016-06-02 06:03:21 +0000 |
commit | 42e015f3e86d3c1712b02756b294f9c1e105f8ab (patch) | |
tree | 5644f78f56fc60a8c24b244e47c9c210de3b30fe /editorlib/src/editorscene.cpp | |
parent | 158f8d8e664e71a8cc087683440c10053508e303 (diff) |
Fixes crash when loading scenes
Change-Id: I81c08727d9c28e7512e5b5a00a10777cf0cb8666
Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
Diffstat (limited to 'editorlib/src/editorscene.cpp')
-rw-r--r-- | editorlib/src/editorscene.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editorlib/src/editorscene.cpp b/editorlib/src/editorscene.cpp index cea674c..4f6bbec 100644 --- a/editorlib/src/editorscene.cpp +++ b/editorlib/src/editorscene.cpp @@ -194,9 +194,11 @@ void EditorScene::addEntity(Qt3DCore::QEntity *entity, int index, Qt3DCore::QEnt } } - // Clear multiselection list, otherwise treeview gets messed up - m_selectedEntityNameList.clear(); - emit multiSelectionChanged(m_selectedEntityNameList); + if (!m_selectedEntityNameList.isEmpty()) { + // Clear multiselection list, otherwise treeview gets messed up + m_selectedEntityNameList.clear(); + emit multiSelectionChanged(m_selectedEntityNameList); + } } // Removed entity is deleted |