jankae / LibreVNA

100kHz to 6GHz 2 port USB based VNA
GNU General Public License v3.0
1.1k stars 209 forks source link

Keep original trace data when de-embedding #171

Closed YuryW closed 1 year ago

YuryW commented 1 year ago

LibreVNA Version

LibreVNA Version (64 bit): 1.5.0-alpha.2-89c9f20d1 OS: Windows 7 Version 6.1 (Build 7601: SP 1) CPU Arch: x86_64

Steps to reproduce

Only the LibreVNA application is running. Imported s3p file. When de-embedding, s2p shunts are inserted in all three ports. After pressing OK in Select Color, the color of the trace changes. After pressing OK in the Edit Trace menu, the trace changes with the changed color (not saved). Color

Color_1

Color_2

Color_3

Expected behavior

When changing colors on de-embedding tracks, only the color changes, and the result of em-bedding should be saved.

Extra information & Setup and Calibration files

sNp.zip

jankae commented 1 year ago

The issue wasn't the color change itself but rather the trace edit dialog: whenever the dialog is closed by pressing OK, the trace data was reloaded from the file. This implicitly caused the de-embedding data to be deleted. Fix: only reload the trace from file when the filename actually has changed.

YuryW commented 1 year ago

Thank you jankae. Now everything is OK.