From abce030d5d4767cb0380a3170e9bb89b1d95f094 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 31 Jan 2019 20:06:09 -0500 Subject: [PATCH] ignore mouse button 4/5 when drawing, fixes #626 perhaps in the future we'll add a use to these --- src/gui/game/GameView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 6535ce061..95be9dd29 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -1198,10 +1198,12 @@ void GameView::OnMouseDown(int x, int y, unsigned button) // update tool index, set new "last" tool so GameView can detect certain tools properly if (button == SDL_BUTTON_LEFT) toolIndex = 0; - if (button == SDL_BUTTON_RIGHT) + else if (button == SDL_BUTTON_RIGHT) toolIndex = 1; - if (button == SDL_BUTTON_MIDDLE) + else if (button == SDL_BUTTON_MIDDLE) toolIndex = 2; + else + return; Tool *lastTool = c->GetActiveTool(toolIndex); c->SetLastTool(lastTool); UpdateDrawMode();