moved cache creation
This commit is contained in:
+5
-7
@@ -15,7 +15,7 @@ def get_src(pvname, cls):
|
||||
return src
|
||||
|
||||
|
||||
def decide_src_plt_cache(pvname):
|
||||
def decide_src_plt(pvname):
|
||||
pvname = pvname.upper()
|
||||
|
||||
if pvname.endswith(":FPICTURE"):
|
||||
@@ -42,10 +42,7 @@ def decide_src_plt_cache(pvname):
|
||||
plt = Plot1D
|
||||
|
||||
plt = plt(name=pvname)
|
||||
|
||||
cache = src.cache.get_view()
|
||||
|
||||
return src, plt, cache
|
||||
return src, plt
|
||||
|
||||
|
||||
|
||||
@@ -53,10 +50,11 @@ class Actor:
|
||||
|
||||
def __init__(self, pvname):
|
||||
self.pvname = pvname
|
||||
self.src, plt, cache = decide_src_plt_cache(pvname)
|
||||
self.cache = cache
|
||||
src, plt = decide_src_plt(pvname)
|
||||
self.src = src
|
||||
self.plt = plt
|
||||
self.frm = frm = Frame(plt)
|
||||
self.cache = cache = src.cache.get_view()
|
||||
|
||||
frm.cfg_ti_cache_size.value = str(cache.size)
|
||||
frm.cfg_ti_cache_size.on_change("value", self.do_update_cache_size)
|
||||
|
||||
Reference in New Issue
Block a user