mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
Hide the tooltip when losing focus
This commit is contained in:
parent
23740d2601
commit
adbcc24aa9
1 changed files with 10 additions and 0 deletions
|
|
@ -174,6 +174,7 @@ public:
|
|||
common::Level2Product selectedLevel2Product_;
|
||||
|
||||
bool hasMouse_ {false};
|
||||
bool lastItemPicked_ {false};
|
||||
QPointF lastPos_ {};
|
||||
QPointF lastGlobalPos_ {};
|
||||
std::size_t currentStyleIndex_;
|
||||
|
|
@ -1044,6 +1045,13 @@ void MapWidget::paintGL()
|
|||
{
|
||||
p->RunMousePicking();
|
||||
}
|
||||
else if (p->lastItemPicked_)
|
||||
{
|
||||
// Hide the tooltip when losing focus
|
||||
util::tooltip::Hide();
|
||||
|
||||
p->lastItemPicked_ = false;
|
||||
}
|
||||
|
||||
// Render ImGui Frame
|
||||
ImGui::Render();
|
||||
|
|
@ -1083,6 +1091,8 @@ void MapWidgetImpl::RunMousePicking()
|
|||
{
|
||||
util::tooltip::Hide();
|
||||
}
|
||||
|
||||
lastItemPicked_ = itemPicked;
|
||||
}
|
||||
|
||||
void MapWidget::mapChanged(QMapLibreGL::Map::MapChange mapChange)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue