[Mod] only register event if event_type is specified

This commit is contained in:
vn.py 2019-05-30 12:34:07 +08:00
parent adc148c593
commit 82aeceff70

View File

@ -237,8 +237,9 @@ class BaseMonitor(QtWidgets.QTableWidget):
"""
Register event handler into event engine.
"""
self.signal.connect(self.process_event)
self.event_engine.register(self.event_type, self.signal.emit)
if self.event_type:
self.signal.connect(self.process_event)
self.event_engine.register(self.event_type, self.signal.emit)
def process_event(self, event):
"""