Skip to content

Commit

Permalink
Use autoconnect_callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jfoster17 committed May 12, 2023
1 parent 1fc4686 commit e7f55d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions glue/viewers/table/qt/data_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion glue/viewers/table/qt/data_viewer.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="valuetext_filter"/>
<widget class="QLineEdit" name="text_filter"/>
</item>
<item>
<widget class="QLabel" name="filter_label_2">
Expand Down

0 comments on commit e7f55d7

Please sign in to comment.