mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fixup for legend mouse events in chartspace
.. when a userchart is embedded into an overview mouse events do not propagate in their entirety- as a result the legend widgets do not see MouseRelease (even though they see MousePress). So the click to show/hide when hovering over a legend item responds to the press not the release.
This commit is contained in:
@@ -94,7 +94,11 @@ GenericLegendItem::eventFilter(QObject *obj, QEvent *e)
|
||||
if (obj != this) return false;
|
||||
|
||||
switch (e->type()) {
|
||||
case QEvent::MouseButtonRelease: // for now just one event, but may do more later
|
||||
|
||||
// release is not propagated when embedded in chartspace
|
||||
// so we respond to press not release events, see:
|
||||
// https://github.com/GoldenCheetah/GoldenCheetah/issues/3992
|
||||
case QEvent::MouseButtonPress:
|
||||
{
|
||||
if (clickable && underMouse()) {
|
||||
enabled=!enabled;
|
||||
|
||||
Reference in New Issue
Block a user