Skip to content

Commit

Permalink
Disable "Select All" button for empty input
Browse files Browse the repository at this point in the history
Just like other buttons on this dialog.

Fixes #1046
  • Loading branch information
mickaelistria committed Aug 21, 2023
1 parent 4d2db98 commit 01c5b67
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,7 @@ private void updateButtonState(boolean disableReplace) {
fWholeWordCheckBox.setEnabled(isWord(str) && !isRegExSearchAvailableAndChecked());

fFindNextButton.setEnabled(enable && findString);
fSelectAllButton.setEnabled(enable && findString && fTarget instanceof IFindReplaceTargetExtension4);
fReplaceSelectionButton.setEnabled(!disableReplace && enable && isEditable() && selection && (!fNeedsInitialFindBeforeReplace || !isRegExSearchAvailableAndChecked()));
fReplaceFindButton.setEnabled(!disableReplace && enable && isEditable() && findString && selection && (!fNeedsInitialFindBeforeReplace || !isRegExSearchAvailableAndChecked()));
fReplaceAllButton.setEnabled(enable && isEditable() && findString);
Expand Down Expand Up @@ -1834,12 +1835,8 @@ public void updateTarget(IFindReplaceTarget target, boolean isTargetEditable, bo
fGiveFocusToFindField= true;
}
initIncrementalBaseLocation();
updateButtonState();
}

if (okToUse(fSelectAllButton)) {
fSelectAllButton.setEnabled(fTarget instanceof IFindReplaceTargetExtension4);
}
updateButtonState();

setContentAssistsEnablement(isRegExSearchAvailableAndChecked());
}
Expand Down

0 comments on commit 01c5b67

Please sign in to comment.