Delete the Cancel button

User avatar
W1JA
Posts: 41
Joined: Sun Apr 09, 2017 3:19 pm

Delete the Cancel button

Postby W1JA » Sat Apr 18, 2020 8:44 pm

Today I was reminded of a bug that I occasionally encounter. While on SSB, I opened Setup to make a change. I decided not to make the change and dismissed the Setup window by clicking its Cancel button. When I did that, my TX profile changed. This issue was repeatable; that is, go back to the correct TX profile, open and then cancel Setup, observe that my TX profile gets changed again. Today is not is not the first time that I've clicked Cancel in Setup and gotten unexpected results. The items that are affected seem to vary.

Back in 2017, Scott, WU2O, explained what's going on. He said in this thread about PowerSDR mRX: https://apache-labs.com/community/viewtopic.php?f=6&t=2624&p=4295&hilit=cancel+setup#p4295
The bug is associated with how and when PowerSDR stores it's current state into the database. This is all the information necessary so that when you switch bands, or from band stack register to band stack register, or close and re-open the program, everything is just the way you left it.

So what's happening is that, when you close the Setup window with the "Cancel" button, it is oh so helpfully taking you back to the previous current state. If you close it with the "OK" button, or with the "X" box, it will not exhibit the behavior you are seeing because it accepts the changes as the new current state of the software. I should also mention that clicking "Apply" and then "Cancel" does not help, as "Cancel" overrides "Apply".

All of this behavior most like dates back to the original, legacy Flex version of PowerSDR. My understanding is that the UI code in those days was quite a mess, and remains so to this day, with a vast number of weird dependencies, and this has a lot to do with these sort of things.
There's still no one willing to work on the big task of untangling the code that remains in Thetis. So I suggest two possible solutions that may not involve any complex code untangling.

1. Remove the Cancel button, which causes the issue. We don't need a Cancel button that doesn't cancel. If there wasn't such a button, at least there would be no unexpected results from clicking it.

or

2. I just noticed that the Cancel button's tooltip says "Load settings from database and close form." The tooltip says exactly what the button actually does! Apparently this is the behavior desired by the programmer. But we don't want to load settings from database; we want to back out of changes made in this session of Setup, and close the form. So maybe it's an easier task to fix this: Don't load settings from database, and just close the form. (But for this to work, settings must not be applied until the Apply button is pressed. It doesn't appear to work this way--I made some changes and closed Setup with its 'X' button in the upper right. Re-entered setup and my changes were still there.)

73, John W1JA

Return to “Thetis”