mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix duplicate layers in popup layer context
Clear layers from context before adding any layer, preventing layers from being kept in the vector until only a single layer is selected. Fixes #4978.
This commit is contained in:
parent
15e6e5eeab
commit
83540ade5c
|
@ -4072,6 +4072,9 @@ void CEditor::RenderLayers(CUIRect LayersBox)
|
|||
}
|
||||
else if(Result == 2)
|
||||
{
|
||||
s_LayerPopupContext.m_vpLayers.clear();
|
||||
s_LayerPopupContext.m_vLayerIndices.clear();
|
||||
|
||||
if(!IsLayerSelected)
|
||||
{
|
||||
SelectLayer(i, g);
|
||||
|
@ -4099,11 +4102,6 @@ void CEditor::RenderLayers(CUIRect LayersBox)
|
|||
s_LayerPopupContext.m_vLayerIndices.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
s_LayerPopupContext.m_vpLayers.clear();
|
||||
s_LayerPopupContext.m_vLayerIndices.clear();
|
||||
}
|
||||
|
||||
UI()->DoPopupMenu(&s_LayerPopupContext, UI()->MouseX(), UI()->MouseY(), 120, 270, &s_LayerPopupContext, PopupLayer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue