jetperch / pyjoulescope_ui

Joulescope graphical user interface
https://www.joulescope.com
Apache License 2.0
75 stars 23 forks source link

Dual marker failure on edge #214

Closed atsju closed 11 months ago

atsju commented 11 months ago

Joulescope model

JS110

UI version

other

What OS are you seeing the problem on?

Windows 10

What happened?

Under some conditions when pushing one marker of a dual marker to the edge of screen, the boundary limit fails and dual marker disappears completely.

What was expected?

The marker shall always stop at the edge, without failure

How to reproduce?

  1. start a capture
  2. put a dual marker
  3. move one of the marker to the edge of the screen
  4. move second marker to other edge of screen

Extra information

UI version 1.0.25

atsju commented 11 months ago

Not directly linked to this issue:

When doing mouse + click on one edge of dual marker to move it. If you go further than the limit, the dual marker is deleted. One workaround is to always move the marker with the marker edge on the side of the window limit where you move to. However, the dual maker should probably just stop at the edge (without resizing itself) independently of the edge you use to move it.

image

mliberty1 commented 11 months ago

Thanks for reporting this issue @atsju . This behavior is actually as designed. With Joulescope UI 1.0.x, markers "stick" to the waveform rather than the screen, at least until #200. The markers need to go away when streaming live data and they go out of scope. The existing code keeps the same logic, even when the streaming data is paused or when viewing JLS files. The faster you drag the mouse, the more likely the marker will go out of the valid range.

We will take a look and see if we can improve this behavior for paused and JLS files.

mliberty1 commented 11 months ago

Ok, I was incorrect about the code not handling this case. The existing code mostly did the right thing bounding the markers to the extent. However, it does contain this code. The purpose of this code is to remove the exported markers. If you do happen to drag dual markers to the full extent, they will also be deleted.

However, it is better not to record the exporting dual markers in the first place. The code is now fixed, but anyone loading exported JLS files from previous Joulescope UI versions will see the exporting dual markers. Not a huge deal, and it will not be an issue going forward with new exports.

The code also has additional bounds checks to prevent CTRL-drag dual markers to stay in scope.

mliberty1 commented 11 months ago

Fixed in 1.0.27