Skip to content
Snippets Groups Projects
Commit e8eaf021 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Improved search

parent d8ea3e08
No related branches found
No related tags found
No related merge requests found
...@@ -682,11 +682,6 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro ...@@ -682,11 +682,6 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro
NotificationPane pane = mainViewController.getNotificationPane(); NotificationPane pane = mainViewController.getNotificationPane();
pane.show("", box); pane.show("", box);
// Auto Complete
Set<String> names = openProject.getPads().stream().filter(p -> p.getStatus() != PadStatus.EMPTY).map(Pad::getName)
.collect(Collectors.toSet());
TextFields.bindAutoCompletion(field, names);
} }
@FXML @FXML
...@@ -742,7 +737,7 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro ...@@ -742,7 +737,7 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro
}); });
} }
private final int LAST_DOCUMENT_LIMIT = 3; private static final int LAST_DOCUMENT_LIMIT = 3;
public void createRecentDocumentMenuItems() { public void createRecentDocumentMenuItems() {
recentOpenMenu.getItems().clear(); recentOpenMenu.getItems().clear();
......
...@@ -323,7 +323,7 @@ public class Project { ...@@ -323,7 +323,7 @@ public class Project {
List<Pad> result = new ArrayList<>(); List<Pad> result = new ArrayList<>();
for (Pad pad : getPads()) { for (Pad pad : getPads()) {
if (pad.getStatus() != PadStatus.EMPTY) { if (pad.getStatus() != PadStatus.EMPTY) {
if (pad.getName().startsWith(name)) { if (pad.getName().toLowerCase().contains(name.toLowerCase())) {
result.add(pad); result.add(pad);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment