Merge pull request #7032 from Marmare314/issue_7031

Do not activate box selection when panning (fixes #7031 and fixes #7030)
This commit is contained in:
Dennis Felsing 2023-08-16 12:56:15 +00:00 committed by GitHub
commit 2e1157bf3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6252,7 +6252,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
{
UI()->SetHotItem(&s_EnvelopeEditorID);
if(UI()->MouseButton(2) || (UI()->MouseButton(0) && Input()->ModifierIsPressed()))
if(s_Operation == OP_NONE && (UI()->MouseButton(2) || (UI()->MouseButton(0) && Input()->ModifierIsPressed())))
{
m_OffsetEnvelopeX += UI()->MouseDeltaX() / Graphics()->ScreenWidth() * UI()->Screen()->w / View.w;
m_OffsetEnvelopeY -= UI()->MouseDeltaY() / Graphics()->ScreenHeight() * UI()->Screen()->h / View.h;
@ -6305,7 +6305,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
RemoveTimeOffsetEnvelope(pEnvelope);
m_Map.OnModify();
}
else if(s_Operation != OP_BOX_SELECT)
else if(s_Operation != OP_BOX_SELECT && !Input()->ModifierIsPressed())
{
static int s_BoxSelectID = 0;
UI()->SetActiveItem(&s_BoxSelectID);