mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Improved find tool usability, make the screen pan to the selected components
This commit is contained in:
@@ -1069,15 +1069,16 @@ public class Presenter implements IPlugInPort {
|
||||
@Override
|
||||
public void selectMatching(String criteria) {
|
||||
Set<IDIYComponent<?>> matching = new HashSet<IDIYComponent<?>>();
|
||||
String regex = ".*" + criteria.toLowerCase() + ".*";
|
||||
for (IDIYComponent<?> c : currentProject.getComponents()) {
|
||||
ComponentType type = ComponentProcessor.getInstance().extractComponentTypeFrom((Class<? extends IDIYComponent<?>>) 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));
|
||||
}
|
||||
|
||||
@@ -4238,6 +4238,10 @@
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Escape comma in BOM CSV files to avoid component names being split into separate columns</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improved find tool usability, make the screen pan to the selected components</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user