dim replace button after replacement in find

This commit is contained in:
benfry
2003-10-18 23:52:58 +00:00
parent 0ce80f3266
commit a6280fad5f
2 changed files with 19 additions and 7 deletions

View File

@@ -133,6 +133,10 @@ public class PdeEditorFind extends JFrame implements ActionListener {
// once found, select it (and go to that line)
public void find() {
// in case search len is zero,
// otherwise replace all will go into an infinite loop
found = false;
String search = findField.getText();
if (search.length() == 0) return;
@@ -168,6 +172,9 @@ public class PdeEditorFind extends JFrame implements ActionListener {
if (!found) return; // don't replace if nothing found
editor.textarea.setSelectedText(replaceField.getText());
editor.setSketchModified(true);
// don't allow a double replace
replaceButton.setEnabled(false);
}