Skip to content

Commit

Permalink
ignore mouse button 4/5 when drawing, fixes #626
Browse files Browse the repository at this point in the history
perhaps in the future we'll add a use to these
  • Loading branch information
jacob1 committed Feb 1, 2019
1 parent 4593a95 commit abce030
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/game/GameView.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit abce030

Please sign in to comment.