1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[ComboTabBar] Correctly returns tabAt over tab icon

This commit is contained in:
David Rosca 2014-05-02 13:35:01 +02:00
parent e379b1b655
commit 7fc7558221

View File

@ -18,6 +18,7 @@
* ============================================================ */
#include "combotabbar.h"
#include "toolbutton.h"
#include "tabicon.h"
#include "mainapplication.h"
#include "proxystyle.h"
#include "qzsettings.h"
@ -217,7 +218,8 @@ QRect ComboTabBar::tabRect(int index) const
int ComboTabBar::tabAt(const QPoint &pos) const
{
if (!qobject_cast<TabBarHelper*>(QApplication::widgetAt(mapToGlobal(pos))))
QWidget* w = QApplication::widgetAt(mapToGlobal(pos));
if (!qobject_cast<TabBarHelper*>(w) && !qobject_cast<TabIcon*>(w))
return -1;
int index = m_pinnedTabBarWidget->tabAt(m_pinnedTabBarWidget->mapFromParent(pos));