mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:30:06 +00:00
Refactor tooltip display
This commit is contained in:
parent
9ebc859756
commit
0badf01a92
8 changed files with 87 additions and 28 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <scwx/qt/model/imgui_context_model.hpp>
|
||||
#include <scwx/qt/util/file.hpp>
|
||||
#include <scwx/qt/util/maplibre.hpp>
|
||||
#include <scwx/qt/util/tooltip.hpp>
|
||||
#include <scwx/qt/view/radar_product_view_factory.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
#include <scwx/util/time.hpp>
|
||||
|
|
@ -1062,6 +1063,7 @@ void MapWidgetImpl::RunMousePicking()
|
|||
|
||||
// For each layer in reverse
|
||||
// TODO: All Generic Layers, not just Placefile Layers
|
||||
bool itemPicked = false;
|
||||
for (auto it = placefileLayers_.rbegin(); it != placefileLayers_.rend();
|
||||
++it)
|
||||
{
|
||||
|
|
@ -1070,9 +1072,16 @@ void MapWidgetImpl::RunMousePicking()
|
|||
params, lastPos_, lastGlobalPos_, mouseScreenCoordinate))
|
||||
{
|
||||
// If a draw item was picked, don't process additional layers
|
||||
itemPicked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If no draw item was picked, hide the tooltip
|
||||
if (!itemPicked)
|
||||
{
|
||||
util::tooltip::Hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MapWidget::mapChanged(QMapLibreGL::Map::MapChange mapChange)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue