mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:36:30 +02:00
Fix keyboard flickering when select entities
Fix entities list footer count of selected entities in the process.
This commit is contained in:
parent
8e44096981
commit
e3be34528f
1 changed files with 10 additions and 7 deletions
|
@ -122,6 +122,8 @@ function loaded() {
|
||||||
focus: false,
|
focus: false,
|
||||||
entityIds: selection,
|
entityIds: selection,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
refreshFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRowDoubleClicked() {
|
function onRowDoubleClicked() {
|
||||||
|
@ -184,6 +186,7 @@ function loaded() {
|
||||||
function clearEntities() {
|
function clearEntities() {
|
||||||
entities = {};
|
entities = {};
|
||||||
entityList.clear();
|
entityList.clear();
|
||||||
|
refreshFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
var elSortOrder = {
|
var elSortOrder = {
|
||||||
|
@ -236,13 +239,16 @@ function loaded() {
|
||||||
refreshFooter();
|
refreshFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSelectedEntities(selectedEntities) {
|
function updateSelectedEntities(selectedIDs) {
|
||||||
var notFound = false;
|
var notFound = false;
|
||||||
for (var id in entities) {
|
for (var id in entities) {
|
||||||
entities[id].el.className = '';
|
entities[id].el.className = '';
|
||||||
}
|
}
|
||||||
for (var i = 0; i < selectedEntities.length; i++) {
|
|
||||||
var id = selectedEntities[i];
|
selectedEntities = [];
|
||||||
|
for (var i = 0; i < selectedIDs.length; i++) {
|
||||||
|
var id = selectedIDs[i];
|
||||||
|
selectedEntities.push(id);
|
||||||
if (id in entities) {
|
if (id in entities) {
|
||||||
var entity = entities[id];
|
var entity = entities[id];
|
||||||
entity.el.className = 'selected';
|
entity.el.className = 'selected';
|
||||||
|
@ -251,10 +257,7 @@ function loaded() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: Fixes the footer and header text sometimes not displaying after adding or deleting entities.
|
refreshFooter();
|
||||||
// The problem appears to be a bug in the Qt HTML/CSS rendering (Qt 5.5).
|
|
||||||
document.getElementById("radius").focus();
|
|
||||||
document.getElementById("radius").blur();
|
|
||||||
|
|
||||||
return notFound;
|
return notFound;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue