mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 13:15:28 +02:00
Fix footer entities count not being updated when change filter value
This commit is contained in:
parent
68499f49ad
commit
a06f49f791
1 changed files with 14 additions and 10 deletions
|
@ -206,10 +206,23 @@ function loaded() {
|
|||
EventBridge.emitWebEvent(JSON.stringify({ type: 'refresh' }));
|
||||
}
|
||||
|
||||
function refreshFooter() {
|
||||
if (selectedEntities.length > 1) {
|
||||
elFooter.firstChild.nodeValue = selectedEntities.length + " entities selected";
|
||||
} else if (selectedEntities.length === 1) {
|
||||
elFooter.firstChild.nodeValue = "1 entity selected";
|
||||
} else if (entityList.visibleItems.length === 1) {
|
||||
elFooter.firstChild.nodeValue = "1 entity found";
|
||||
} else {
|
||||
elFooter.firstChild.nodeValue = entityList.visibleItems.length + " entities found";
|
||||
}
|
||||
}
|
||||
|
||||
function refreshEntityListObject() {
|
||||
refreshEntityListTimer = null;
|
||||
entityList.sort(currentSortColumn, { order: currentSortOrder });
|
||||
entityList.search(elFilter.value);
|
||||
refreshFooter();
|
||||
}
|
||||
|
||||
function updateSelectedEntities(selectedEntities) {
|
||||
|
@ -227,16 +240,6 @@ function loaded() {
|
|||
}
|
||||
}
|
||||
|
||||
if (selectedEntities.length > 1) {
|
||||
elFooter.firstChild.nodeValue = selectedEntities.length + " entities selected";
|
||||
} else if (selectedEntities.length === 1) {
|
||||
elFooter.firstChild.nodeValue = "1 entity selected";
|
||||
} else if (entityList.visibleItems.length === 1) {
|
||||
elFooter.firstChild.nodeValue = "1 entity found";
|
||||
} else {
|
||||
elFooter.firstChild.nodeValue = entityList.visibleItems.length + " entities found";
|
||||
}
|
||||
|
||||
// HACK: Fixes the footer and header text sometimes not displaying after adding or deleting entities.
|
||||
// The problem appears to be a bug in the Qt HTML/CSS rendering (Qt 5.5).
|
||||
document.getElementById("radius").focus();
|
||||
|
@ -371,6 +374,7 @@ function loaded() {
|
|||
|
||||
window.onresize = resize;
|
||||
elFilter.onchange = resize;
|
||||
elFilter.onblur = refreshFooter;
|
||||
|
||||
|
||||
var showExtraInfo = false;
|
||||
|
|
Loading…
Reference in a new issue