From db9a762f58d42f15865cd0e86df1ae86d4d6c340 Mon Sep 17 00:00:00 2001 From: Learath2 Date: Sat, 3 Oct 2020 18:35:38 +0200 Subject: [PATCH] Fix multiple layer editing. Close #2981 --- src/game/editor/editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 57873d515..67f86868e 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -3480,8 +3480,8 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect View) bool AllTile = true; for(int i = 0; AllTile && i < m_lSelectedLayers.size(); i++) { - if(m_Map.m_lGroups[m_SelectedGroup]->m_lLayers[i]->m_Type == LAYERTYPE_TILES) - s_LayerPopupContext.m_aLayers.add((CLayerTiles *)m_Map.m_lGroups[m_SelectedGroup]->m_lLayers[i]); + if(m_Map.m_lGroups[m_SelectedGroup]->m_lLayers[m_lSelectedLayers[i]]->m_Type == LAYERTYPE_TILES) + s_LayerPopupContext.m_aLayers.add((CLayerTiles *)m_Map.m_lGroups[m_SelectedGroup]->m_lLayers[m_lSelectedLayers[i]]); else AllTile = false; }