Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323605 - ToggleButtonRidget.setOutputOnly() does not work properly
Summary: ToggleButtonRidget.setOutputOnly() does not work properly
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: ridget (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 08:38 EDT by Steffen Kriese CLA
Modified: 2015-06-30 10:09 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot showing the result of the 2 snippets (3.63 KB, image/jpeg)
2010-08-25 08:39 EDT, Steffen Kriese CLA
no flags Details
Patch for the SWT-ExampleClient to reproduce the bug (4.55 KB, patch)
2010-08-25 08:41 EDT, Steffen Kriese CLA
no flags Details | Diff
Possible Fix (9.74 KB, patch)
2010-08-26 01:49 EDT, Elias Volanakis CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Kriese CLA 2010-08-25 08:38:26 EDT
The visual appearance of the ToggleButtons outputmarker depends on the order in which setOutputOnly() and setSelected() is called.

The following two snippets lead to different result:

Case 1:
choiceFirst.setSelected(true);
choiceFirst.setOutputOnly(true);


Case 2:
choiceLast.setOutputOnly(true);
choiceLast.setSelected(true);
Comment 1 Steffen Kriese CLA 2010-08-25 08:39:50 EDT
Created attachment 177411 [details]
Screenshot showing the result of the 2 snippets
Comment 2 Steffen Kriese CLA 2010-08-25 08:41:48 EDT
Created attachment 177412 [details]
Patch for the SWT-ExampleClient to reproduce the bug
Comment 3 Elias Volanakis CLA 2010-08-25 19:23:49 EDT
Reproducible, thanks!

Interesting side note: it works if the setters are not called from inside the listener, but from configureRigets()   (that's why I didn't catch it earlier).
Comment 4 Elias Volanakis CLA 2010-08-26 01:49:41 EDT
Created attachment 177491 [details]
Possible Fix

Here is a patch that fixes this.

I'm investigating one more alternative, so I haven't committed this yet.
Comment 5 Elias Volanakis CLA 2011-08-03 14:35:12 EDT
Ressigning to default assignee. Not working on Riena right now.
Comment 6 Elias Volanakis CLA 2011-08-03 14:35:16 EDT
Reassigning to default assignee. Not working on Riena right now.
Comment 7 Nobody - feel free to take it CLA 2015-06-30 10:09:41 EDT
Fixed for single radio buttons, check boxes, and ChoiceComposite.