drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
206 stars 52 forks source link

Restore Defaults not restoring defaults on Ubuntu 20 #202

Closed drowe67 closed 2 years ago

drowe67 commented 2 years ago

Tested 5ecb957a on Ubuntu 20

  1. Configure something (like Tools-PTT check Hamlib).
  2. Tools - Restore Defaults (but keep freedv-gui running).
  3. ls shows ~/.freedv is deleted.
  4. close the freedv-gui app.
  5. ~/.freedv is restored.

I think it's something to do with the wxWidgets DeleleAll() function. This deletes the disk file, but then something in the shut down code must be reconstructing it.

tmiw commented 2 years ago

Looks like there are a bunch of calls to pConfig->Write() and pConfig->Flush() in ~MainFrame(), which probably explains the config file coming back. The fix might very well be to not call those if the user already selected Restore Defaults.

That said, it seems weird that one has to restart for a reset to take effect, rather than simply setting all configuration options to their default values.