From c1014f474822b58d74aa25a132cf21e9ad2611f6 Mon Sep 17 00:00:00 2001 From: parax0 Date: Thu, 17 Mar 2016 15:23:26 -0600 Subject: [PATCH] Fixed a bug that caused a crash if you tried to spawn an instance without changing the spawn layer --- src/Editor/WorldEditor/WCreateTab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Editor/WorldEditor/WCreateTab.cpp b/src/Editor/WorldEditor/WCreateTab.cpp index a3b4714c..c8c042ca 100644 --- a/src/Editor/WorldEditor/WCreateTab.cpp +++ b/src/Editor/WorldEditor/WCreateTab.cpp @@ -75,8 +75,10 @@ void WCreateTab::OnLayersChanged() for (u32 iLyr = 0; iLyr < pArea->GetScriptLayerCount(); iLyr++) ui->SpawnLayerComboBox->addItem(TO_QSTRING(pArea->GetScriptLayer(iLyr)->Name())); - ui->SpawnLayerComboBox->blockSignals(false); ui->SpawnLayerComboBox->setCurrentIndex(0); + ui->SpawnLayerComboBox->blockSignals(false); + + OnSpawnLayerChanged(0); } void WCreateTab::OnSpawnLayerChanged(int LayerIndex)