nion-software / nionswift

Nion Swift is open source scientific image processing software integrating hardware control, data acquisition, visualization, processing, and analysis using Python. Nion Swift is easily extended using Python. It runs on Windows, Linux, and macOS.
http://nion.com/swift
GNU General Public License v3.0
45 stars 33 forks source link

Stroke width on line plots stops updating correctly #1212

Open KRLango opened 1 week ago

KRLango commented 1 week ago

If you have a line plot with multiple layers and swap the order of the layers by pressing the move layer up button on layer 1 (making it layer 0). The stroke width will no longer update when changing the number in the edit box for layer 0 (was layer 1). If you update anything else about the appearance of the plot, for example changing layer 1's stroke width, then all updates will happen, including the stroke width for layer 0.

cmeyer commented 1 week ago

This sounds like a good one to write a test for to show the issue...!

cmeyer commented 1 week ago

This works ok for me with the #1201 and my new Inspector.py changes. Confirm?

jamesrussell216 commented 1 week ago

@cmeyer I looked at this today and it's still happening for me as described above. Quick test case...

  1. Using the uSim EELS Camera, take two snapshots (hereafter referred to as Snapshot 1 and Snapshot 2).
  2. Drag Snapshot 2 data item onto the axis of Snapshot 1 to make a "Multiple Data Items" display item.
  3. In the Inspector, change the Layer 1 Stroke Width to 5 and press return.
  4. (observe the line width of the red Layer 1 graph increase in thickness)
  5. Press the little "up arrow" underneath Layer 1 to promote it to Layer 0.
  6. Change the (now) Layer 0 Stroke Width to 1 and press return.
  7. (observe the line width not changing thickness).
KRLango commented 1 week ago

I have double checked using #1201 following the latest updates on that PR and it is still showing the same behaviour for me.

cmeyer commented 3 days ago

I've been able to reproduce this. It's not just stroke width, but the other properties that are disconnected after moving layers. I'm tracking down the issue and will have a PR shortly.

cmeyer commented 3 days ago

PR

Ion-e commented 2 days ago

Excellent, sending to test until it's been merged.