forked from M-Labs/artiq
1
0
Fork 0

gui/datasets: do not crash when a display data is unavailable

This commit is contained in:
Sebastien Bourdeauducq 2015-10-24 09:57:42 +08:00
parent fd910faa38
commit b0ef0d205a
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ class DatasetsDock(dockarea.Dock):
return self.table_model return self.table_model
def update_display_data(self, dsp): def update_display_data(self, dsp):
dsp.update_data({k: self.table_model.backing_store[k][1] filtered_data = {k: self.table_model.backing_store[k][1]
for k in dsp.data_sources()}) for k in dsp.data_sources()
if k in self.table_model.backing_store}
dsp.update_data(filtered_data)
def on_mod(self, mod): def on_mod(self, mod):
if mod["action"] == "init": if mod["action"] == "init":