Skip to content

Commit

Permalink
Remove __gluestate__ and __setgluestate__ from base Application class…
Browse files Browse the repository at this point in the history
… since it is different between Jupyter and Qt glue
  • Loading branch information
astrofrog committed Aug 16, 2024
1 parent 0a797b4 commit 7359dba
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions glue/core/application_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,18 +350,3 @@ def set_data_color(self, color, alpha):
for data in self.data_collection:
data.style.color = color
data.style.alpha = alpha

def __gluestate__(self, context):
viewers = [list(map(context.id, tab)) for tab in self.viewers]
data = self.session.data_collection
from glue.main import _loaded_plugins
return dict(session=context.id(self.session), viewers=viewers,
data=context.id(data), plugins=_loaded_plugins)

@classmethod
def __setgluestate__(cls, rec, context):
self = cls(data_collection=context.object(rec['data']))
# manually register the newly-created session, which
# the viewers need
context.register_object(rec['session'], self.session)
return self

0 comments on commit 7359dba

Please sign in to comment.