Skip to content

Commit

Permalink
ICE - replace ListViewSearch with ListViewFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Jul 26, 2023
1 parent 8281dc2 commit 2471dbc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions orangecontrib/explain/widgets/owice.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pyqtgraph as pg

from orangecanvas.gui.utils import disconnected
from orangewidget.utils.listview import ListViewSearch
from orangewidget.utils.listview import ListViewFilter

from Orange.base import Model
from Orange.data import Table, ContinuousVariable, Variable, \
Expand Down Expand Up @@ -261,7 +261,7 @@ def __on_mouse_moved(self, point: QPointF):
)

# points
x_data = self.__data.get_column_view(self.__feature)[0][indices]
x_data = self.__data.get_column(self.__feature)[indices]
n_dec = self.__feature.number_of_decimals
y_data = []
for i, x in zip(indices, x_data):
Expand Down Expand Up @@ -537,7 +537,7 @@ def __init__(self):
self.domain: Optional[Domain] = None
self.graph: ICEPlot = None
self._target_combo: QComboBox = None
self._features_view: ListViewSearch = None
self._features_view: ListViewFilter = None
self._features_model: VariableListModel = None
self._color_model: DomainModel = None

Expand Down Expand Up @@ -571,10 +571,10 @@ def _add_controls(self):
box = gui.vBox(self.controlArea, "Feature")
self._features_model = VariableListModel()
sorted_model = SortProxyModel(sortRole=Qt.UserRole)
sorted_model.setSourceModel(self._features_model)
sorted_model.sort(0)
self._features_view = ListViewSearch()
self._features_view.setModel(sorted_model)
self._features_view = ListViewFilter(
model=self._features_model, proxy=sorted_model
)
self._features_view.setMinimumSize(QSize(30, 100))
self._features_view.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
Expand Down Expand Up @@ -788,7 +788,7 @@ def setup_plot(self):
color_labels = None
if self.color_var and self.color_var.is_discrete:
colors = self.color_var.colors
color_col = self.data[mask].get_column_view(self.color_var)[0]
color_col = self.data[mask].get_column(self.color_var)
color_labels = self.color_var.values

self.graph.set_data(self.data[mask], self.feature,
Expand Down

0 comments on commit 2471dbc

Please sign in to comment.