Opened 8 years ago

Closed 8 years ago

#4400 closed enhancement (fixed)

OMPlot: Double click on plot legend entry toggles hiding trace

Reported by: Jan Kokert Owned by: Adeel Asghar
Priority: high Milestone: 1.12.0
Component: OMEdit Version: v1.12.0
Keywords: omplot hide entry double clock Cc: Lennart Ochel

Description

When working with OMPlot it is desired from time to time to hide/show variables from a certain variable set of interest.
To hide variables (to get a better plot overview), there are currently two options:
1.) Right click on legend entry->Setup->[]Hide
2.) Search that variable in the browser and untick the box
Both are not really convenient!

Consequently, I suggest that a double click on a plot legend entry (above the graph) toggles hiding of that trace

Change History (16)

comment:1 by Adeel Asghar, 8 years ago

Resolution: wontfix
Status: newclosed

This is not possible. Since Qwt doesn't allow accessing items of the legend. I can only get click event on the whole legend and not on the individual legend items.

comment:2 by Adeel Asghar, 8 years ago

Milestone: Future1.12.0

comment:3 by Jan Kokert, 8 years ago

This is really sad... But one fact makes me think that this is still possible:

We can right-click on the legend and choose Setup. Then the setup pops up with exactly that trace selected in the list.
So we have (1) a click event on the whole legend and (2) an identifier of that trace. What else do we need?

It would be fantastic if this works as this would speed up signal investigation a lot.

comment:4 by Adeel Asghar, 8 years ago

Resolution: wontfix
Status: closedreopened

OK. My comment was very impulsive. It seems like it is possible.
I will fix it.

comment:5 by Jan Kokert, 8 years ago

No problem - you are fixing one of my tickets after the other - this is so great to follow.
*Makes my day*

comment:6 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: reopenedclosed

Done in ba9d6fd/OMPlot.

comment:7 by Adeel Asghar, 8 years ago

Cc: Lennart Ochel added

@janK do you mind if we change it from double to single click?

comment:8 by Jan Kokert, 8 years ago

I couldn't try out the new behavior yet. If you think this is handier, then sure, change it to a single click. Maybe a double-click could then open the trace setup...

comment:9 by Jan Kokert, 8 years ago

Maybe a double-click could then open the trace setup...

Actually, in other plot programms like LTSpice, a double click will hide all other traces and will just display the double-clicked one. Maybe this is even better - but this is also a higher programming effort - you can decide.

in reply to:  9 comment:10 by Lennart Ochel, 8 years ago

Replying to janK:

Maybe a double-click could then open the trace setup...

Actually, in other plot programms like LTSpice, a double click will hide all other traces and will just display the double-clicked one. Maybe this is even better - but this is also a higher programming effort - you can decide.

I just wanted to propose an option to hide all signals in the popup menu on a right click. But mapping this to the double click would be even nicer!

comment:11 by Jan Kokert, 8 years ago

But mapping this to the double click would be even nicer!

Ok, cool! I just can say, that the behavior in LTSpice is very convenient (double click = hide all traces but this one)

comment:12 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: closedreopened

Just summarizing all the proposals,

  • Right click should show the context menu (the current behavior).
  • Left click toggles the visibility.
  • Double click hide all except this.

Anything I missed/misunderstood?

comment:13 by Jan Kokert, 8 years ago

You got it perfectly right! gn8

comment:14 by Adeel Asghar, 8 years ago

Done in 0466192/OMPlot.

The only minor problem I see is that when you double click then the curve first hides and then show. This is because first the single click event is raised and we toggle the visibility in it.

comment:15 by Lennart Ochel, 8 years ago

It works nicely. Thanks!

comment:16 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.