From e7f55d7375aae12dad8f086d2c9cec99d4ce25e4 Mon Sep 17 00:00:00 2001 From: Jonathan Foster Date: Fri, 12 May 2023 09:30:47 -0400 Subject: [PATCH] Use autoconnect_callbacks --- glue/viewers/table/qt/data_viewer.py | 6 ++---- glue/viewers/table/qt/data_viewer.ui | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/glue/viewers/table/qt/data_viewer.py b/glue/viewers/table/qt/data_viewer.py index 05903f920..3d7e7220e 100644 --- a/glue/viewers/table/qt/data_viewer.py +++ b/glue/viewers/table/qt/data_viewer.py @@ -8,7 +8,7 @@ from qtpy import QtCore, QtGui, QtWidgets from matplotlib.colors import ColorConverter -from echo.qt import connect_combo_selection, connect_text, connect_checkable_button +from echo.qt import autoconnect_callbacks_to_qt from glue.utils.qt import get_qapp from glue.config import viewer_tool from glue.core import BaseData, Data @@ -290,9 +290,7 @@ def __init__(self, session, state=None, parent=None, widget=None): self.data = None self.model = None - self._connection1 = connect_combo_selection(self.state, 'filter_att', self.ui.combosel_filter_att) - self._connection2 = connect_text(self.state, 'filter', self.ui.valuetext_filter) - self._connection3 = connect_checkable_button(self.state, 'regex', self.ui.bool_regex) + self._connections = autoconnect_callbacks_to_qt(self.state, self.ui) self.state.add_callback('regex', self._on_filter_changed) self.state.add_callback('filter', self._on_filter_changed) diff --git a/glue/viewers/table/qt/data_viewer.ui b/glue/viewers/table/qt/data_viewer.ui index a79e5054d..629809f2c 100644 --- a/glue/viewers/table/qt/data_viewer.ui +++ b/glue/viewers/table/qt/data_viewer.ui @@ -37,7 +37,7 @@ - +