mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 10:00:06 +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_;
|
common::Level2Product selectedLevel2Product_;
|
||||||
|
|
||||||
bool hasMouse_ {false};
|
bool hasMouse_ {false};
|
||||||
|
bool lastItemPicked_ {false};
|
||||||
QPointF lastPos_ {};
|
QPointF lastPos_ {};
|
||||||
QPointF lastGlobalPos_ {};
|
QPointF lastGlobalPos_ {};
|
||||||
std::size_t currentStyleIndex_;
|
std::size_t currentStyleIndex_;
|
||||||
|
|
@ -1044,6 +1045,13 @@ void MapWidget::paintGL()
|
||||||
{
|
{
|
||||||
p->RunMousePicking();
|
p->RunMousePicking();
|
||||||
}
|
}
|
||||||
|
else if (p->lastItemPicked_)
|
||||||
|
{
|
||||||
|
// Hide the tooltip when losing focus
|
||||||
|
util::tooltip::Hide();
|
||||||
|
|
||||||
|
p->lastItemPicked_ = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Render ImGui Frame
|
// Render ImGui Frame
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
|
|
@ -1083,6 +1091,8 @@ void MapWidgetImpl::RunMousePicking()
|
||||||
{
|
{
|
||||||
util::tooltip::Hide();
|
util::tooltip::Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastItemPicked_ = itemPicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWidget::mapChanged(QMapLibreGL::Map::MapChange mapChange)
|
void MapWidget::mapChanged(QMapLibreGL::Map::MapChange mapChange)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue