1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[251877] Find/Replace dialog incorrectly restores Forward/Backward button states

This commit is contained in:
Ted Williams 2008-10-23 17:33:45 +00:00
parent 351ab621de
commit 899c96ac5b

View file

@ -565,10 +565,13 @@ public class FindReplaceDialog extends SelectionDialog
fForwardButton = new Button(directionGroup, SWT.RADIO); fForwardButton = new Button(directionGroup, SWT.RADIO);
fForwardButton.setText(Messages.getString("FindReplaceDialog.ButtonForward")); //$NON-NLS-1$ fForwardButton.setText(Messages.getString("FindReplaceDialog.ButtonForward")); //$NON-NLS-1$
Button backwardButton = new Button(directionGroup, SWT.RADIO); final Button backwardButton = new Button(directionGroup, SWT.RADIO);
backwardButton.setText(Messages.getString("FindReplaceDialog.ButtonBackward")); //$NON-NLS-1$ backwardButton.setText(Messages.getString("FindReplaceDialog.ButtonBackward")); //$NON-NLS-1$
fForwardButton.setSelection(fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true")); final boolean isForward = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true");
backwardButton.setSelection(!fForwardButton.getSelection()); Display.getDefault().asyncExec(new Runnable() { public void run() {
fForwardButton.setSelection(isForward);
backwardButton.setSelection(!isForward);
}});
data = new FormData(); data = new FormData();
data.top = new FormAttachment(fReplaceText); data.top = new FormAttachment(fReplaceText);