Revert "Reset brush when changing active layer (fixes #485)"

Made it impossible to copy layer content to another layer and then use
autofiller on that: https://forum.ddnet.tw/viewtopic.php?f=16&t=6450

This reverts commit df6e3a541f.
This commit is contained in:
def 2019-01-11 17:57:00 +01:00
parent 17a808a080
commit e8e2cd9f49

View file

@ -3271,7 +3271,6 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect View)
if(int Result = DoButton_Ex(&m_Map.m_lGroups[g], aBuf, g==m_SelectedGroup, &Slot,
BUTTON_CONTEXT, m_Map.m_lGroups[g]->m_Collapse ? "Select group. Shift click to select all layers. Double click to expand." : "Select group. Shift click to select all layers. Double click to collapse.", 0, FontSize))
{
m_Brush.Clear();
m_SelectedGroup = g;
SelectLayer(0);
if ((Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)) && m_SelectedGroup == g)
@ -3356,14 +3355,10 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect View)
if ((Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)) && m_SelectedGroup == g)
{
if(!m_lSelectedLayers.remove(i))
{
m_Brush.Clear();
m_lSelectedLayers.add(i);
}
}
else
{
m_Brush.Clear();
m_SelectedGroup = g;
SelectLayer(i);
}