allow adding several pvs at once
This commit is contained in:
+7
-5
@@ -20,16 +20,18 @@ class Director:
|
||||
doc.add_root(layout)
|
||||
|
||||
|
||||
def on_add_pv(self, attr, old, new):
|
||||
print(f"CB Add PV: attribute \"{attr}\" changed from \"{old}\" to \"{new}\"")
|
||||
new = new.replace(",", " ").split()
|
||||
new = reversed(new)
|
||||
self.add_pvs(*new)
|
||||
|
||||
|
||||
def add_pvs(self, *pvnames):
|
||||
for n in pvnames:
|
||||
self.add_pv(n)
|
||||
|
||||
|
||||
def on_add_pv(self, attr, old, new):
|
||||
print("CB Add PV:", attr, old, new)
|
||||
self.add_pv(new)
|
||||
|
||||
|
||||
def add_pv(self, pvname):
|
||||
print("Add PV:", pvname)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user