mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
keep selection when moving layers fixes #6787
This commit is contained in:
parent
9aa04d90f6
commit
972fc717a6
|
@ -3978,11 +3978,15 @@ void CEditor::RenderLayers(CUIRect LayersBox)
|
|||
}
|
||||
|
||||
auto InsertPosition = std::find(vpNewGroupLayers.begin(), vpNewGroupLayers.end(), pNextLayer);
|
||||
int InsertPositionIndex = InsertPosition - vpNewGroupLayers.begin();
|
||||
vpNewGroupLayers.insert(InsertPosition, vpSelectedLayers.begin(), vpSelectedLayers.end());
|
||||
|
||||
m_SelectedGroup = GroupAfterDraggedLayer - 1;
|
||||
int NumSelectedLayers = m_vSelectedLayers.size();
|
||||
m_vSelectedLayers.clear();
|
||||
m_vSelectedQuads.clear();
|
||||
for(int i = 0; i < NumSelectedLayers; i++)
|
||||
m_vSelectedLayers.push_back(InsertPositionIndex + i);
|
||||
|
||||
m_SelectedGroup = GroupAfterDraggedLayer - 1;
|
||||
m_Map.OnModify();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue