From 76e948e5e040fb29713c81fb7a87fa715081ad11 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Thu, 11 Jan 2024 17:13:02 -0800 Subject: [PATCH] PSF format wasn't handling 'slider' keyword (and not showing slider by default) --- src/bundles/md_crds/bundle_info.xml | 2 +- src/bundles/md_crds/src/__init__.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bundles/md_crds/bundle_info.xml b/src/bundles/md_crds/bundle_info.xml index eae8b50a63..1987325cc7 100644 --- a/src/bundles/md_crds/bundle_info.xml +++ b/src/bundles/md_crds/bundle_info.xml @@ -1,4 +1,4 @@ - diff --git a/src/bundles/md_crds/src/__init__.py b/src/bundles/md_crds/src/__init__.py index 2a6bb7f03b..25516c7f26 100644 --- a/src/bundles/md_crds/src/__init__.py +++ b/src/bundles/md_crds/src/__init__.py @@ -34,9 +34,13 @@ def run_provider(session, name, mgr): from chimerax.open_command import OpenerInfo if name == "psf": class MDInfo(OpenerInfo): - def open(self, session, data, file_name, **kw): + def open(self, session, data, file_name, *, slider=True, **kw): from .read_psf import read_psf - return read_psf(session, data, file_name, **kw) + models, status = read_psf(session, data, file_name, **kw) + if slider and session.ui.is_gui: + from chimerax.std_commands.coordset import coordset_slider + coordset_slider(session, models) + return models, status @property def open_args(self): from chimerax.core.commands import BoolArg, OpenFileNameArg, PositiveIntArg