Fix display of "nothing found" label in thumb overviews
This commit is contained in:
parent
f57f36de05
commit
0e014f8d8d
|
@ -383,11 +383,6 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
|
||||
// move models, which are tracked by the recorder to the front
|
||||
moveActiveRecordingsToFront();
|
||||
|
||||
// show "empty" label, if grid is still empty
|
||||
if (grid.getChildren().isEmpty()) {
|
||||
nodes.add(noResultsFound);
|
||||
}
|
||||
} finally {
|
||||
gridLock.unlock();
|
||||
}
|
||||
|
@ -795,9 +790,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
insert(thumbCell);
|
||||
}
|
||||
filteredThumbCells.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
// remove the ones from grid, which don't match
|
||||
for (Iterator<Node> iterator = grid.getChildren().iterator(); iterator.hasNext();) {
|
||||
Node node = iterator.next();
|
||||
|
@ -823,6 +816,13 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
}
|
||||
}
|
||||
|
||||
if (grid.getChildren().size() > 1 && grid.getChildren().contains(noResultsFound)) {
|
||||
grid.getChildren().remove(noResultsFound);
|
||||
} else if (grid.getChildren().isEmpty()) {
|
||||
grid.getChildren().add(noResultsFound);
|
||||
}
|
||||
}
|
||||
|
||||
private void moveActiveRecordingsToFront() {
|
||||
List<ThumbCell> thumbsToMove = new ArrayList<>();
|
||||
ObservableList<Node> thumbs = grid.getChildren();
|
||||
|
|
Loading…
Reference in New Issue