Bug 558015 - Radio button selection ignored in 4.12 version
Summary: Radio button selection ignored in 4.12 version
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: 4.16 M1   Edit
Assignee: Nikita Nemkin CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
: 559920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-09 03:56 EST by hetal sardhara CLA
Modified: 2020-04-08 04:29 EDT (History)
6 users (show)

See Also:


Attachments
I have attached video , you can see perfect result. (279.88 KB, video/x-ms-wmv)
2019-12-09 03:56 EST, hetal sardhara CLA
no flags Details
Snippet to reproduce (2.11 KB, application/octet-stream)
2020-01-28 11:21 EST, Paul Pazderski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description hetal sardhara CLA 2019-12-09 03:56:37 EST
Created attachment 281168 [details]
I have attached video , you can see perfect result.

we have a radio buttons and File dialog components in shell. First we select radio option and than we open file dialog to select file. After selecting we close file dailog, By default the first radio button is checked.it change the selection.
Comment 1 Julian Honnen CLA 2019-12-10 04:48:07 EST
Moving to Platform...

Please attach the source code for your example.
Comment 2 Massimo Rabbi CLA 2020-01-28 11:03:54 EST
Hi, I verified a similar issue in our product (Jaspersoft Studio).
Apparently the problem is related to the shell instance used to create the FileDialog. 
We were re-using the active shell coming from the current display.

As a workaround give it a try creating in your code a temporary shell and later dispose it once done. It should work fine. For me it worked.

By the way this behavior is verified only in Windows. In Mac everything works fine.

I can confirm that in old Eclipse platform 4.7.3a everything worked fine. While it can be reproduced in both 4.12 and 4.14. I personally tested with our latest plugin installation in order to verify the issue was not caused by our code.

I will try to register, later this week, a screencast with the steps to reproduce (in our product) and I will try to put down some sample code for it so maybe you can investigate.
Comment 3 Paul Pazderski CLA 2020-01-28 11:21:02 EST
Created attachment 281634 [details]
Snippet to reproduce

(In reply to Massimo Rabbi from comment #2)
> I will try to register, later this week, a screencast with the steps to
> reproduce (in our product) and I will try to put down some sample code for
> it so maybe you can investigate.

Thank you Massimo. A simple example to reproduce is always great. In this case I was able to modify SWT Snippet72 to reproduce this error.

To reproduce select the second option, click open button, close dialog.
Comment 4 Eclipse Genie CLA 2020-02-07 09:29:09 EST
New Gerrit change created: https://git.eclipse.org/r/157366
Comment 5 Nikita Nemkin CLA 2020-02-07 11:36:08 EST
*** Bug 559920 has been marked as a duplicate of this bug. ***
Comment 6 Paul Pazderski CLA 2020-02-07 12:02:59 EST
(In reply to Nikita Nemkin from bug 559920 comment #5)
> Do you think your patch is still necessary if we fix focus saving?

No. I think if the correct radio is the saved focus control that will work. However it was not trivial for me with all this nasty focus stuff. I took the easy way and restored what had worked once.

If you want to try, feel free to fix focus saving.
Comment 7 Eclipse Genie CLA 2020-02-16 04:11:26 EST
New Gerrit change created: https://git.eclipse.org/r/157766
Comment 9 Niraj Modi CLA 2020-04-08 04:29:57 EDT
Verified using Build id: I20200407-1800 on Win10.