Skip to content

Commit 8a73362

Browse files
committed
qtvcp -screen_options: allow ZMQ to be initialized after loading.
This allows turning on ZMQ options in a subclassed handler file.
1 parent 5094f5c commit 8a73362

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lib/python/qtvcp/widgets/screen_options.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ def _hal_init(self):
306306
STATUS.emit('update-machine-log', '', 'INITIAL')
307307
STATUS.connect('tool-info-changed', lambda w, data: self._tool_file_info(data, TOOL.COMMENTS))
308308

309-
# install remote control
310-
if self.add_send_zmq:
311-
self.init_zmq_publish()
312-
if self.add_receive_zmq:
313-
self.init_zmg_subscribe()
314-
315309
# This is called early by qt_makegui.py for access to
316310
# be able to pass the preference object to the widgets
317311
def _pref_init(self):
@@ -860,11 +854,16 @@ def resetColor(self):
860854

861855
def set_send_zmg(self, data):
862856
self.add_send_zmq = data
857+
# install remote control
858+
if data:
859+
self.init_zmq_publish()
863860
def get_send_zmg(self):
864861
return self.add_send_zmq
865862

866863
def set_receive_zmg(self, data):
867864
self.add_receive_zmq = data
865+
if data:
866+
self.init_zmg_subscribe()
868867
def get_receive_zmg(self):
869868
return self.add_receive_zmq
870869

0 commit comments

Comments
 (0)