Fix tooltip flicker on ToolBar

This commit is contained in:
David Capello 2014-04-13 21:20:06 -03:00
parent 31e1b4e387
commit cd464f6694

View File

@ -223,15 +223,17 @@ bool ToolBar::onProcessMessage(Message* msg)
// hot button changed
if (new_hot_tool != m_hotTool ||
new_hot_index != m_hotIndex) {
m_hotTool = new_hot_tool;
m_hotIndex = new_hot_index;
invalidate();
if (!m_currentStrip) {
if (m_hotIndex != NoneIndex && !hasCapture())
openTipWindow(m_hotIndex, m_hotTool);
else
closeTipWindow();
}
if (m_hotTool) {
if (hasCapture())
@ -273,12 +275,13 @@ bool ToolBar::onProcessMessage(Message* msg)
closeTipWindow();
if (!m_popupWindow)
if (!m_popupWindow || !m_popupWindow->isVisible()) {
m_tipOpened = false;
m_hotTool = NULL;
m_hotIndex = NoneIndex;
invalidate();
}
StatusBar::instance()->clearText();
break;
@ -617,6 +620,7 @@ void ToolBar::onClosePopup()
m_openOnHot = false;
m_hotTool = NULL;
m_hotIndex = NoneIndex;
m_currentStrip = NULL;
invalidate();