nion-software / nionui

Nion UI is a Python UI framework with a Qt backend.
Other
4 stars 15 forks source link

Radio buttons should not be deselectable #76

Open jamesrussell216 opened 1 month ago

jamesrussell216 commented 1 month ago

In the Acquisition window, you can click on a selected Mode radio button and have no select radio options!

image

cmeyer commented 1 month ago

This is the result of this change nion-software/nionui-tool@67c5decf716e9ada89addfe023f6e034030fae6c. I am reviewing why that change was needed.

cmeyer commented 1 month ago

This is fixed nion-software/nionui-tool@419509e99136cbacdcb83f1f13f5936fce5a6313 and nion-software/nionui@f378ed7a4f45a373e2e487062d06ab255289c2ff

However, I am not 100% confident about the fix - I had disabled a setting for "autoExclusive" (auto disables other buttons belonging to a common parent) on the Qt radio buttons in May 2021, but I couldn't find any case where it fails now without "autoExclusive" disabled. So I re-enabled it and that fixes this particular issue. As a fallback, I included a way to set the "autoExclusive" setting from Python in the future if needed.

General point is that Declarative should auto-create a radio group to fully resolve this issue. The problem with doing that is where to store the button group... I'll leave that as an exercise for another day.

Watch for other radio button issues now that I've re-enabled "autoExclusive". Possible issue would be wrong item selected even though the correct radio button is enabled.

jamesrussell216 commented 1 month ago

Sorry @cmeyer but still seems to be possible unless I'm missing something...

image

cmeyer commented 1 month ago

To test this, you either need to run Swift using PyQtProxy (latest code) or using a newly built nionui-tool. Are you still seeing the error in one/both of those situations? More details on launching with nionui-tool here.

jamesrussell216 commented 1 month ago

@cmeyer I thought so but @KRLango then found...

https://github.com/nion-software/nionui-tool/actions/runs/10010833174

Is that going to be why?!

cmeyer commented 1 month ago

Did you run the Windows version from that link? The linux and macos builds are failing, but the Windows build looks successful. (I'm working on those builds separately)