Commit f91d2b30 authored by Xuetian Weng's avatar Xuetian Weng

[kimpanel] correctly hide candidate when LookupTableVisible is false

parent 6a76ce0b
......@@ -192,15 +192,19 @@ PlasmaCore.Dialog {
if (data["LookupTable"]) {
var table = data["LookupTable"];
if (table.length < tableList.count) {
tableList.remove(table.length, tableList.count - table.length);
}
for (var i = 0; i < table.length; i ++) {
if (i >= tableList.count) {
tableList.append({'label' : table[i].label, 'text': table[i].text, 'index': i});
} else {
tableList.set(i, {'label' : table[i].label, 'text': table[i].text, 'index': i});
if (LookupTableVisible) {
if (table.length < tableList.count) {
tableList.remove(table.length, tableList.count - table.length);
}
for (var i = 0; i < table.length; i ++) {
if (i >= tableList.count) {
tableList.append({'label' : table[i].label, 'text': table[i].text, 'index': i});
} else {
tableList.set(i, {'label' : table[i].label, 'text': table[i].text, 'index': i});
}
}
} else {
tableList.clear();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment