Merge pull request #7735 from archimede67/fix-editor-multi-edit-issues

Editor: fix duplicate layers in popup layer context
This commit is contained in:
Dennis Felsing 2023-12-27 23:10:34 +00:00 committed by GitHub
commit e8da11bcf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}