Differential D1784 Diff 10061 ps/trunk/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp
/* Copyright (C) 2014 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | void EditableListCtrl::OnMouseEvent(wxMouseEvent& event) | ||||
if (event.LeftDClick() || event.RightDown()) | if (event.LeftDClick() || event.RightDown()) | ||||
{ | { | ||||
// Work out what cell was clicked on: | // Work out what cell was clicked on: | ||||
wxPoint pt = event.GetPosition(); | wxPoint pt = event.GetPosition(); | ||||
int col = GetColumnAtPosition(pt); | int col = GetColumnAtPosition(pt); | ||||
wxCHECK2(col >= 0 && col < (int)m_ColumnTypes.size(), return); | if (col < 0 || col >= static_cast<int>(m_ColumnTypes.size())) | ||||
return; | |||||
int flags; | int flags; | ||||
long row = HitTest(pt, flags); | long row = HitTest(pt, flags); | ||||
if (row != wxNOT_FOUND && (flags & wxLIST_HITTEST_ONITEM)) | if (row != wxNOT_FOUND && (flags & wxLIST_HITTEST_ONITEM)) | ||||
{ | { | ||||
// Calculate the exact positioning of the clicked cell | // Calculate the exact positioning of the clicked cell | ||||
wxRect rect; | wxRect rect; | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator