Skip to content

Commit

Permalink
Merge pull request #4674 from janezd/remove-domaincontexthandlers
Browse files Browse the repository at this point in the history
Remove DomainContextHandler from Table and PCA
  • Loading branch information
ajdapretnar authored Apr 24, 2020
2 parents 90c8066 + 758d81e commit cf0f69f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions Orange/widgets/data/owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from Orange.statistics import basic_stats

from Orange.widgets import gui
from Orange.widgets.settings import Setting, DomainContextHandler
from Orange.widgets.settings import Setting
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.widget import OWWidget, Input, Output
from Orange.widgets.utils import datacaching
Expand Down Expand Up @@ -425,8 +425,6 @@ class Outputs:
auto_commit = Setting(True)

color_by_class = Setting(True)
settingsHandler = DomainContextHandler(
match_values=DomainContextHandler.MATCH_VALUES_ALL)
selected_rows = Setting([], schema_only=True)
selected_cols = Setting([], schema_only=True)

Expand Down Expand Up @@ -493,7 +491,6 @@ def sizeHint():
@Inputs.data
def set_dataset(self, data, tid=None):
"""Set the input dataset."""
self.closeContext()
if data is not None:
datasetname = getattr(data, "name", "Data")
if tid in self._inputs:
Expand Down Expand Up @@ -560,7 +557,6 @@ def update(_):
self.set_info(current.input_slot.summary)

self.tabs.tabBar().setVisible(self.tabs.count() > 1)
self.openContext(data)

if data and self.__pending_selected_rows is not None:
self.selected_rows = self.__pending_selected_rows
Expand Down
6 changes: 1 addition & 5 deletions Orange/widgets/unsupervised/owpca.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ class Outputs:
components = Output("Components", Table)
pca = Output("PCA", PCA, dynamic=False)

settingsHandler = settings.DomainContextHandler()

ncomponents = settings.Setting(2)
variance_covered = settings.Setting(100)
auto_commit = settings.Setting(True)
normalize = settings.ContextSetting(True)
normalize = settings.Setting(True)
maxp = settings.Setting(20)
axis_labels = settings.Setting(10)

Expand Down Expand Up @@ -113,7 +111,6 @@ def __init__(self):

@Inputs.data
def set_data(self, data):
self.closeContext()
self.clear_messages()
self.clear()
self.information()
Expand All @@ -136,7 +133,6 @@ def set_data(self, data):
self.clear_outputs()
return

self.openContext(data)
self._init_projector()

self.data = data
Expand Down

0 comments on commit cf0f69f

Please sign in to comment.