fix turn graph tooltips off problem.

This commit is contained in:
LoudSnorer 2023-03-21 19:03:29 -04:00
parent c5aa443a4e
commit 570915e6c1
2 changed files with 6 additions and 3 deletions

View File

@ -169,8 +169,11 @@ w+=m_spacer*2;
h+=m_spacer*2; */
//}
void gToolTip::display(QString text, int x, int y, ToolTipAlignment align, int timeout)
void gToolTip::display(QString text, int x, int y, ToolTipAlignment align, int timeout,bool alwaysShow)
{
if (!alwaysShow && !AppSetting->graphTooltips()) {
return;
}
if (timeout <= 0) {
timeout = AppSetting->tooltipTimeout();
}
@ -343,7 +346,7 @@ void gParentToolTip::paint(QPainter &painter,int width,int height) {
if (!m_parent_visible) {return ;};
m_width=width;
m_height=height;
gToolTip::display(m_text, 0, 0,m_alignment, m_timeout);
gToolTip::display(m_text, 0, 0,m_alignment, m_timeout,true);
gToolTip::paint(painter);
};

View File

@ -235,7 +235,7 @@ class gToolTip : public QObject
/*! \fn virtual void display(QString text, int x, int y, int timeout=2000);
\brief Set the tooltips display message, position, and timeout value
*/
virtual void display(QString text, int x, int y, ToolTipAlignment align = TT_AlignCenter, int timeout = 0);
virtual void display(QString text, int x, int y, ToolTipAlignment align = TT_AlignCenter, int timeout = 0,bool alwaysShow=false);
//! \brief Draw the tooltip
virtual void paint(QPainter &paint); //actually paints it.