Index: ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp =================================================================== --- ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -51,6 +51,11 @@ static HighResTimer g_Timer; +/** + * wxWidgets only registers the double click on mousedown. + */ +static int g_Clicks = 1; + using namespace AtlasMessage; ////////////////////////////////////////////////////////////////////////// @@ -272,9 +277,12 @@ // Button down and double click appear to be mutually exclusive events, // meaning a second button down event is not sent before a double click if (evt.ButtonDown() || evt.ButtonDClick()) - POST_MESSAGE(GuiMouseButtonEvent, (evt.GetButton(), true, evt.GetPosition())); + { + g_Clicks = evt.ButtonDClick() ? 2 : 1; + POST_MESSAGE(GuiMouseButtonEvent, (evt.GetButton(), true, evt.GetPosition(), g_Clicks)); + } else if (evt.ButtonUp()) - POST_MESSAGE(GuiMouseButtonEvent, (evt.GetButton(), false, evt.GetPosition())); + POST_MESSAGE(GuiMouseButtonEvent, (evt.GetButton(), false, evt.GetPosition(), g_Clicks)); else if (evt.GetEventType() == wxEVT_MOTION) POST_MESSAGE(GuiMouseMotionEvent, (evt.GetPosition())); } Index: ps/trunk/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp =================================================================== --- ps/trunk/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp +++ ps/trunk/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -170,6 +170,7 @@ ev.ev.type = msg->pressed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP; ev.ev.button.button = msg->button; ev.ev.button.state = msg->pressed ? SDL_PRESSED : SDL_RELEASED; + ev.ev.button.clicks = msg->clicks; float x, y; msg->pos->GetScreenSpace(x, y); ev.ev.button.x = (u16)clamp((int)x, 0, g_xres); Index: ps/trunk/source/tools/atlas/GameInterface/Messages.h =================================================================== --- ps/trunk/source/tools/atlas/GameInterface/Messages.h +++ ps/trunk/source/tools/atlas/GameInterface/Messages.h @@ -90,6 +90,7 @@ ((int, button)) ((bool, pressed)) ((Position, pos)) + ((int, clicks)) ); MESSAGE(GuiMouseMotionEvent,