6542: potential fix for #6529 r=def- a=Marmare314


## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: marmare314 <49279081+Marmare314@users.noreply.github.com>
This commit is contained in:
bors[bot] 2023-04-29 08:45:55 +00:00 committed by GitHub
commit 4b27611201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3605,6 +3605,10 @@ void CEditor::RenderLayers(CUIRect LayersBox)
if(s_Operation == OP_GROUP_DRAG && Clicked)
MoveGroup = true;
}
else if(s_pDraggedButton == &m_Map.m_vpGroups[g])
{
s_Operation = OP_NONE;
}
}
for(int i = 0; i < (int)m_Map.m_vpGroups[g]->m_vpLayers.size(); i++)
@ -3800,6 +3804,10 @@ void CEditor::RenderLayers(CUIRect LayersBox)
MoveLayers = true;
}
}
else if(s_pDraggedButton == m_Map.m_vpGroups[g]->m_vpLayers[i])
{
s_Operation = OP_NONE;
}
}
if(s_Operation != OP_GROUP_DRAG || g != m_SelectedGroup)