Commit ae5c67f9 authored by Yoann Laissus's avatar Yoann Laissus
Browse files

Don't close Bookmark Toolbar's subfolders on a click

BUG: 275155
parent 321983b1
......@@ -233,17 +233,16 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
&& !m_currentMenu->rect().contains(m_currentMenu->mapFromGlobal(QCursor::pos())))
{
// To switch root folders as in a menubar
if (event->type() == QEvent::MouseMove)
KBookmarkActionMenu* act = dynamic_cast<KBookmarkActionMenu *>(toolBar()->actionAt(toolBar()->mapFromGlobal(QCursor::pos())));
if (event->type() == QEvent::MouseMove && act && act->menu() != m_currentMenu)
{
KBookmarkActionMenu* act = dynamic_cast<KBookmarkActionMenu *>(toolBar()->actionAt(toolBar()->mapFromGlobal(QCursor::pos())));
if (act && act->menu() != m_currentMenu)
{
m_currentMenu->hide();
QPoint pos = toolBar()->mapToGlobal(toolBar()->widgetForAction(act)->pos());
act->menu()->popup(QPoint(pos.x(), pos.y() + toolBar()->widgetForAction(act)->height()));
}
}
else if (event->type() == QEvent::MouseButtonPress)
else if (event->type() == QEvent::MouseButtonPress && act)
{
m_currentMenu->hide();
}
......
Supports Markdown
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