mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-26 17:53:55 +02:00
[251877] Find/Replace dialog incorrectly restores Forward/Backward button states
This commit is contained in:
parent
899c96ac5b
commit
3c61232e71
1 changed files with 9 additions and 17 deletions
|
@ -568,10 +568,8 @@ public class FindReplaceDialog extends SelectionDialog
|
||||||
final 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$
|
||||||
final boolean isForward = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true");
|
final boolean isForward = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT_FORWARD, "true").equalsIgnoreCase("true");
|
||||||
Display.getDefault().asyncExec(new Runnable() { public void run() {
|
fForwardButton.setSelection(isForward);
|
||||||
fForwardButton.setSelection(isForward);
|
backwardButton.setSelection(!isForward);
|
||||||
backwardButton.setSelection(!isForward);
|
|
||||||
}});
|
|
||||||
|
|
||||||
data = new FormData();
|
data = new FormData();
|
||||||
data.top = new FormAttachment(fReplaceText);
|
data.top = new FormAttachment(fReplaceText);
|
||||||
|
@ -652,16 +650,13 @@ public class FindReplaceDialog extends SelectionDialog
|
||||||
|
|
||||||
final String format = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT, FindReplaceDialog.SEARCH_FORMAT_ASCII);
|
final String format = fProperties.getProperty(FindReplaceDialog.SEARCH_FORMAT, FindReplaceDialog.SEARCH_FORMAT_ASCII);
|
||||||
|
|
||||||
Display.getDefault().asyncExec(new Runnable(){
|
fFormatAsciiButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_ASCII));
|
||||||
public void run() {
|
fFormatOctalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_OCTAL));
|
||||||
fFormatAsciiButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_ASCII));
|
fFormatBinaryButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BINARY));
|
||||||
fFormatOctalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_OCTAL));
|
fFormatDecimalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_DECIMAL));
|
||||||
fFormatBinaryButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BINARY));
|
fFormatHexButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_HEX));
|
||||||
fFormatDecimalButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_DECIMAL));
|
fFormatByteSequenceButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BYTESEQUENCE));
|
||||||
fFormatHexButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_HEX));
|
|
||||||
fFormatByteSequenceButton.setSelection(format.equals(FindReplaceDialog.SEARCH_FORMAT_BYTESEQUENCE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
data = new FormData();
|
data = new FormData();
|
||||||
data.top = new FormAttachment(rangeGroup);
|
data.top = new FormAttachment(rangeGroup);
|
||||||
|
@ -767,9 +762,6 @@ public class FindReplaceDialog extends SelectionDialog
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
fForwardButton.setSelection(true);
|
|
||||||
fFormatAsciiButton.setSelection(true);
|
|
||||||
|
|
||||||
composite.setTabList(new Control[] {
|
composite.setTabList(new Control[] {
|
||||||
fFindText,
|
fFindText,
|
||||||
fReplaceText,
|
fReplaceText,
|
||||||
|
|
Loading…
Add table
Reference in a new issue