diff --git a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java index b09cb827..573fb0c4 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java +++ b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java @@ -1069,15 +1069,16 @@ public class Presenter implements IPlugInPort { @Override public void selectMatching(String criteria) { Set> matching = new HashSet>(); + String regex = ".*" + criteria.toLowerCase() + ".*"; for (IDIYComponent c : currentProject.getComponents()) { ComponentType type = ComponentProcessor.getInstance().extractComponentTypeFrom((Class>) c.getClass()); - if ((c.getName() != null && c.getName().toLowerCase().matches(criteria.toLowerCase())) || - (c.getValueForDisplay() != null && c.getValueForDisplay().toLowerCase().matches(criteria.toLowerCase())) || - (type != null && type.getName().toLowerCase().matches(criteria.toLowerCase()))) + if ((c.getName() != null && c.getName().toLowerCase().matches(regex)) || + (c.getValueForDisplay() != null && c.getValueForDisplay().toLowerCase().matches(regex)) || + (type != null && type.getName().toLowerCase().matches(regex))) matching.add(c); } updateSelection(matching); - messageDispatcher.dispatchMessage(EventType.REPAINT); + messageDispatcher.dispatchMessage(EventType.REPAINT, true); if (matching.size() > 0) messageDispatcher.dispatchMessage(EventType.SCROLL_TO, getSelectionBounds(true)); } diff --git a/diylc/diylc-core/src/org/diylc/presenter/update.xml b/diylc/diylc-core/src/org/diylc/presenter/update.xml index 4bfe6f06..20f53a65 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/update.xml +++ b/diylc/diylc-core/src/org/diylc/presenter/update.xml @@ -4237,6 +4237,10 @@ IMPROVEMENT Escape comma in BOM CSV files to avoid component names being split into separate columns + + + IMPROVEMENT + Improved find tool usability, make the screen pan to the selected components https://github.com/bancika/diy-layout-creator/releases diff --git a/diylc/diylc-swing/dict.txt b/diylc/diylc-swing/dict.txt index 18315e0d..9565c0e9 100644 --- a/diylc/diylc-swing/dict.txt +++ b/diylc/diylc-swing/dict.txt @@ -55,7 +55,7 @@ Box C-B-E BJT Circle Coil(s) -Component reordering is possible only when Project Explorer is sorted by z-index +Component reordering is possible only when Project Explorer is sorted by z-index. Configuration Could not apply changes. Check the log for details. D-G-S JFET