Commit 85da204e authored by Eike Ziller's avatar Eike Ziller

Fix mouse usage of locator popup on some systems

The logic to not hide the popup if it got active was lost in
e133ee89

Change-Id: Ic3af147194f7ad18d510e827db1d5804e48e1f97
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent fe7ec249
......@@ -359,7 +359,8 @@ QSize LocatorPopup::preferredSize()
void TopLeftLocatorPopup::inputLostFocus()
{
hide();
if (!isActiveWindow())
hide();
}
void LocatorPopup::inputLostFocus()
......@@ -391,7 +392,8 @@ LocatorPopup::LocatorPopup(LocatorWidget *locatorWidget, QWidget *parent)
connect(locatorWidget, &LocatorWidget::parentChanged, this, &LocatorPopup::updateWindow);
connect(locatorWidget, &LocatorWidget::showPopup, this, &LocatorPopup::show);
connect(locatorWidget, &LocatorWidget::hidePopup, this, &LocatorPopup::close);
connect(locatorWidget, &LocatorWidget::lostFocus, this, &LocatorPopup::inputLostFocus);
connect(locatorWidget, &LocatorWidget::lostFocus, this, &LocatorPopup::inputLostFocus,
Qt::QueuedConnection);
connect(locatorWidget, &LocatorWidget::selectRow, m_tree, [this](int row) {
m_tree->setCurrentIndex(m_tree->model()->index(row, 0));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment