| Summary: | Disabling ITextRidget with direct writing corrupts ridget | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] Riena | Reporter: | Benno Baumgartner <benno.baumgartner> | ||||
| Component: | UI | Assignee: | Elias Volanakis <elias> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | christian.campo | ||||
| Version: | 2.0.0 | ||||||
| Target Milestone: | 3.0.0.M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 172822 [details]
Snippet to reproduce bug
Reproducible.
This occurred all Text*Ridgets when directWriting is enabled. Fixed in HEAD. |
2.0.0 RC3 1. Given following snipped: DatePickerComposite widget= UIControlsFactory.createDatePickerComposite(parent, "date"); //$NON-NLS-1$ GridData layoutData= new GridData(SWT.FILL, SWT.TOP, false, false); widget.setLayoutData(layoutData); final IDateTextRidget ridget= (IDateTextRidget) SwtRidgetFactory.createRidget(widget); ridget.setDirectWriting(true); Button button1= new Button(parent, SWT.PUSH); button1.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); button1.setText("Enable/Disable"); button1.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ridget.setEnabled(!ridget.isEnabled()); } }); Button button2= new Button(parent, SWT.PUSH); button2.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); button2.setText("Read/Write"); button2.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ridget.setOutputOnly(!ridget.isOutputOnly()); } }); 2. Do not select a date (field shows " . . ") 3. Press Enable/Disable button 4. Press Enable/Disable button again IS: Now the field shows "" and it is no longer possible to enter a date with the keyboard SHOULD: Field shows " . . " and entering a date with keyboard is possible 5. Select a date with the picker 6. Press Enable/Disable button IS: Selected date is gone SHOULD: Selected date is shown and ridget is rendered disabled Similar problem when changing the output only state of the ridget. It works fine when not setting direct writing, but I need direct writing.