Scoped script text search fixes

Parameters panel on Script search can be turned off in settings
This commit is contained in:
Jindra Petřík
2021-02-24 19:55:59 +01:00
parent 9cac6ddb49
commit 43baf9d178
13 changed files with 201 additions and 99 deletions
@@ -79,7 +79,7 @@ public class SearchDialog extends AppDialog {
}
}
public SearchDialog(Window owner, boolean replace, String selection) {
public SearchDialog(Window owner, boolean replace, String selection, boolean selectionFirst) {
super(owner);
setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
ignoreCaseCheckBox.setSelected(true);
@@ -118,6 +118,17 @@ public class SearchDialog extends AppDialog {
scopeComboBox = new JComboBox<>(scopeItems.toArray(new String[scopeItems.size()]));
panField.add(scopeComboBox);
if (selection != null && !selectionFirst) {
scopeComboBox.setSelectedIndex(1);
}
if (replace) {
if (selection != null) {
scopeComboBox.setSelectedIndex(1);
}
scopeComboBox.setEnabled(false);
}
cnt.add(panField);
JPanel checkPanel = new JPanel(new FlowLayout());