mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:00:05 +00:00
Add geographic coordinates to mouse picking functions
This commit is contained in:
parent
6e04e1fab3
commit
a2f2181f1b
19 changed files with 72 additions and 42 deletions
|
|
@ -80,7 +80,8 @@ bool DrawLayer::RunMousePicking(
|
|||
const QMapLibreGL::CustomLayerRenderParameters& params,
|
||||
const QPointF& mouseLocalPos,
|
||||
const QPointF& mouseGlobalPos,
|
||||
const glm::vec2& mouseCoords)
|
||||
const glm::vec2& mouseCoords,
|
||||
const common::Coordinate& mouseGeoCoords)
|
||||
{
|
||||
bool itemPicked = false;
|
||||
|
||||
|
|
@ -88,8 +89,11 @@ bool DrawLayer::RunMousePicking(
|
|||
for (auto it = p->drawList_.rbegin(); it != p->drawList_.rend(); ++it)
|
||||
{
|
||||
// Run mouse picking on each draw item
|
||||
if ((*it)->RunMousePicking(
|
||||
params, mouseLocalPos, mouseGlobalPos, mouseCoords))
|
||||
if ((*it)->RunMousePicking(params,
|
||||
mouseLocalPos,
|
||||
mouseGlobalPos,
|
||||
mouseCoords,
|
||||
mouseGeoCoords))
|
||||
{
|
||||
// If a draw item was picked, don't process additional items
|
||||
itemPicked = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue