mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 07:02:50 +01:00
feat: push data into row immediately
This commit is contained in:
1 parent
c479051c2f
commit
78be350863
1 file changed
+5
-3
@@ -122,12 +122,14 @@ class FilteredModelManager:
|
|||||||
# if row[7] in self.ping_cache:
|
# if row[7] in self.ping_cache:
|
||||||
# row[9] = self.ping_cache[row[7]]
|
# row[9] = self.ping_cache[row[7]]
|
||||||
|
|
||||||
|
# NOTE: this ListStore manipulation must remain local to the thread
|
||||||
clone = self.new_model_from_class(ServerColumns)
|
clone = self.new_model_from_class(ServerColumns)
|
||||||
|
n_cols = clone.get_n_columns()
|
||||||
if len(rows) > 0:
|
if len(rows) > 0:
|
||||||
# TODO: considering exposing an option to not sort rows
|
|
||||||
rows = self.sort_rows(rows)
|
rows = self.sort_rows(rows)
|
||||||
for row in rows:
|
for i, row in enumerate(rows):
|
||||||
clone.append(row)
|
clone.insert_with_values(i, tuple(range(0, n_cols)), row)
|
||||||
|
#clone.append(row)
|
||||||
|
|
||||||
self.set_cache(filters, clone, rows)
|
self.set_cache(filters, clone, rows)
|
||||||
self.set_model(clone)
|
self.set_model(clone)
|
||||||
|
|||||||
Reference in new issue
Block a user