From 3a33b94eba99a45cfc2564916915e416975d0da5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 Aug 2014 13:36:18 +0300 Subject: Fix context menu in minimap. --- src/gui/windows/minimap.cpp | 7 +++++++ src/gui/windows/minimap.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 71689805f..31d8169d1 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -436,6 +436,13 @@ void Minimap::draw(Graphics *graphics) BLOCK_END("Minimap::draw") } +void Minimap::mousePressed(MouseEvent &event) +{ + if (event.getButton() == MouseButton::RIGHT) + return; + Window::mousePressed(event); +} + void Minimap::mouseReleased(MouseEvent &event) { Window::mouseReleased(event); diff --git a/src/gui/windows/minimap.h b/src/gui/windows/minimap.h index eacf7a018..becf50f7b 100644 --- a/src/gui/windows/minimap.h +++ b/src/gui/windows/minimap.h @@ -66,6 +66,8 @@ class Minimap final : public Window, public ConfigListener void mouseReleased(MouseEvent &event) override final; + void mousePressed(MouseEvent &event) override final; + void mouseExited(MouseEvent &event) override final; void screenToMap(int &x, int &y); -- cgit v1.2.3-70-g09d2