mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
Merge pull request #7735 from archimede67/fix-editor-multi-edit-issues
Editor: fix duplicate layers in popup layer context
This commit is contained in:
commit
e8da11bcf0
|
@ -4072,6 +4072,9 @@ void CEditor::RenderLayers(CUIRect LayersBox)
|
||||||
}
|
}
|
||||||
else if(Result == 2)
|
else if(Result == 2)
|
||||||
{
|
{
|
||||||
|
s_LayerPopupContext.m_vpLayers.clear();
|
||||||
|
s_LayerPopupContext.m_vLayerIndices.clear();
|
||||||
|
|
||||||
if(!IsLayerSelected)
|
if(!IsLayerSelected)
|
||||||
{
|
{
|
||||||
SelectLayer(i, g);
|
SelectLayer(i, g);
|
||||||
|
@ -4099,11 +4102,6 @@ void CEditor::RenderLayers(CUIRect LayersBox)
|
||||||
s_LayerPopupContext.m_vLayerIndices.clear();
|
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);
|
UI()->DoPopupMenu(&s_LayerPopupContext, UI()->MouseX(), UI()->MouseY(), 120, 270, &s_LayerPopupContext, PopupLayer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue