1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

fixed toolTip on pinning/unpinning (#2598)

This commit is contained in:
Anmol Gautam 2018-02-10 02:27:37 +05:30 committed by David Rosca
parent 31e4d5fd5f
commit 582fb72115
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -262,6 +262,8 @@ int TabStackedWidget::pinUnPinTab(int index, const QString &title)
bool makePinned = index >= m_tabBar->pinnedTabsCount(); bool makePinned = index >= m_tabBar->pinnedTabsCount();
QWidget* button = m_tabBar->tabButton(index, m_tabBar->iconButtonPosition()); QWidget* button = m_tabBar->tabButton(index, m_tabBar->iconButtonPosition());
// To show tooltip of tab which is pinned in the current session
QString toolTip = tabToolTip(index);
m_tabBar->m_blockCurrentChangedSignal = true; m_tabBar->m_blockCurrentChangedSignal = true;
m_tabBar->setTabButton(index, m_tabBar->iconButtonPosition(), 0); m_tabBar->setTabButton(index, m_tabBar->iconButtonPosition(), 0);
@ -271,6 +273,7 @@ int TabStackedWidget::pinUnPinTab(int index, const QString &title)
m_tabBar->setTabButton(newIndex, m_tabBar->iconButtonPosition(), button); m_tabBar->setTabButton(newIndex, m_tabBar->iconButtonPosition(), button);
m_tabBar->m_blockCurrentChangedSignal = false; m_tabBar->m_blockCurrentChangedSignal = false;
setTabToolTip(newIndex, toolTip);
// Restore current widget // Restore current widget
setCurrentWidget(currentWidget); setCurrentWidget(currentWidget);