Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V7: Devices appear in wrong workspace #1207

Closed
srcejon opened this issue Apr 20, 2022 · 4 comments
Closed

V7: Devices appear in wrong workspace #1207

srcejon opened this issue Apr 20, 2022 · 4 comments
Labels
bug v7 Scheduled for version 7

Comments

@srcejon
Copy link
Collaborator

srcejon commented Apr 20, 2022

When reopening a configuration, devices can sometimes appear in the wrong workspace.

To recreate:

Workspace > New
Workspace > New
In W1 add Rx device > File Input
Switch to W0 tab
Exit SDRangel
Restart SDRangel
Exit SDRangel
Restart SDRangel
After the second restart, the FileInput device that was in W1 is now in W0, although its spectrum remains in W1.

@f4exb f4exb added the v7 Scheduled for version 7 label Apr 20, 2022
@f4exb
Copy link
Owner

f4exb commented Apr 20, 2022

Even simpler:
Workspace > New
Workspace > New
In W1 add Rx device > File Input
Exit SDRangel
Restart SDRangel
Exit SDRangel
Restart SDRangel

So it seems switching to W0 does not make the difference you just need to exit/restart twice.

@f4exb
Copy link
Owner

f4exb commented Apr 20, 2022

Debug messages:

Workspace > New
Workspace > New
In W1 add Rx device > File Input
Exit SDRangel
2022-04-20 13:47:37.753 (D) MainWindow::saveConfiguration: sdrangel.samplesource.testsource device in workspace 1 spectrun in 1
Restart SDRangel
2022-04-20 13:48:17.753 (D) MainWindow::loadConfiguration: add source sdrangel.samplesource.testsource in workspace 1 spectrum in 1
Exit SDRangel
2022-04-20 13:49:17.955 (D) MainWindow::saveConfiguration: sdrangel.samplesource.testsource device in workspace 0 spectrun in 1

So the error appears during the second exit

@f4exb
Copy link
Owner

f4exb commented Apr 20, 2022

I think this is because the workspace index is saved in the device settings and thus the deserialization overwrites the index in the device GUI and this is what is saved at exit. I think the workspace index should be a member of the DeviceGUI class instead similarly to the MainSpectrumGUI.

f4exb added a commit that referenced this issue Apr 20, 2022
f4exb added a commit that referenced this issue Apr 20, 2022
@f4exb f4exb added the bug label Apr 20, 2022
@f4exb f4exb added this to the v7.0.0-alpha.2 milestone Apr 25, 2022
@f4exb
Copy link
Owner

f4exb commented Apr 28, 2022

Fixed in v7.0.0-alpha2

@f4exb f4exb closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v7 Scheduled for version 7
Projects
None yet
Development

No branches or pull requests

2 participants