Skip to content

Commit

Permalink
Revert "Reset brush when changing active layer (fixes #485)"
Browse files Browse the repository at this point in the history
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 df6e3a5.
  • Loading branch information
def- committed Jan 11, 2019
1 parent 17a808a commit e8e2cd9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/game/editor/editor.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit e8e2cd9

Please sign in to comment.