mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-19 16:21:08 +00:00
Fix mouse tracking to fix tooltip behavior. Also hide tooltips
when the mouse is moved.
This commit is contained in:
parent
12eea9ed69
commit
7657684dad
@ -173,6 +173,9 @@ SceneWidget::SceneWidget(boost::shared_ptr<Resource::ResourceSystem> resourceSys
|
|||||||
|
|
||||||
mResourceSystem->getSceneManager()->setParticleSystemMask(Mask_ParticleSystem);
|
mResourceSystem->getSceneManager()->setParticleSystemMask(Mask_ParticleSystem);
|
||||||
|
|
||||||
|
// Recieve mouse move event even if mouse button is not pressed
|
||||||
|
setMouseTracking(true);
|
||||||
|
|
||||||
/// \todo make shortcut configurable
|
/// \todo make shortcut configurable
|
||||||
QShortcut *focusToolbar = new QShortcut (Qt::Key_T, this, 0, 0, Qt::WidgetWithChildrenShortcut);
|
QShortcut *focusToolbar = new QShortcut (Qt::Key_T, this, 0, 0, Qt::WidgetWithChildrenShortcut);
|
||||||
connect (focusToolbar, SIGNAL (activated()), this, SIGNAL (focusToolbarRequest()));
|
connect (focusToolbar, SIGNAL (activated()), this, SIGNAL (focusToolbarRequest()));
|
||||||
|
@ -646,8 +646,11 @@ void CSVRender::WorldspaceWidget::mouseMoveEvent (QMouseEvent *event)
|
|||||||
mToolTipPos = event->globalPos();
|
mToolTipPos = event->globalPos();
|
||||||
|
|
||||||
if (mShowToolTips)
|
if (mShowToolTips)
|
||||||
|
{
|
||||||
|
QToolTip::hideText();
|
||||||
mToolTipDelayTimer.start (mToolTipDelay);
|
mToolTipDelayTimer.start (mToolTipDelay);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SceneWidget::mouseMoveEvent(event);
|
SceneWidget::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user