From 899c96ac5b800d3c9c12fbb42a77118ea135a2f4 Mon Sep 17 00:00:00 2001 From: Ted Williams Date: Thu, 23 Oct 2008 17:33:45 +0000 Subject: [PATCH] [251877] Find/Replace dialog incorrectly restores Forward/Backward button states --- .../dd/debug/ui/memory/search/FindReplaceDialog.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java b/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java index 621ce9ee792..6f043f4cbf1 100644 --- a/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java +++ b/plugins/org.eclipse.dd.debug.ui.memory.search/src/org/eclipse/dd/debug/ui/memory/search/FindReplaceDialog.java @@ -565,10 +565,13 @@ public class FindReplaceDialog extends SelectionDialog fForwardButton = new Button(directionGroup, SWT.RADIO); 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$ - fForwardButton.setSelection(fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true")); - backwardButton.setSelection(!fForwardButton.getSelection()); + final boolean isForward = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true"); + Display.getDefault().asyncExec(new Runnable() { public void run() { + fForwardButton.setSelection(isForward); + backwardButton.setSelection(!isForward); + }}); data = new FormData(); data.top = new FormAttachment(fReplaceText);