diff --git a/CHANGES.rst b/CHANGES.rst index 7296bf9cd6..66a7267969 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -73,6 +73,9 @@ Specviz Bug Fixes --------- +- Fixed loading data via the Import Data button on top-left of the application. + [#1608] + Cubeviz ^^^^^^^ @@ -110,7 +113,7 @@ Specviz2d - Fixed default spectral extraction parameters when the background separation otherwise would have fallen directly on the edge of the image. [#1633] -- Fix parser for Level 2 NIRSpec ``s2d`` files. [#1608] +- Fixed parser for Level 2 NIRSpec ``s2d`` files. [#1608] Other Changes and Additions --------------------------- diff --git a/jdaviz/configs/default/plugins/data_tools/data_tools.py b/jdaviz/configs/default/plugins/data_tools/data_tools.py index 0a6256a1d0..7dc1b5d985 100644 --- a/jdaviz/configs/default/plugins/data_tools/data_tools.py +++ b/jdaviz/configs/default/plugins/data_tools/data_tools.py @@ -1,5 +1,4 @@ from jdaviz.core.template_mixin import TemplateMixin -from jdaviz.core.events import LoadDataMessage from traitlets import Unicode, Bool import os from jdaviz.configs.default.plugins.data_tools.file_chooser import FileChooser @@ -41,14 +40,9 @@ def vue_load_data(self, *args, **kwargs): self.error_message = "No file selected" elif os.path.exists(self._file_upload.file_path): try: - load_data_message = LoadDataMessage(self._file_upload.file_path, sender=self) - self.hub.broadcast(load_data_message) + # NOTE: Helper loader does more stuff than native Application loader. + self.app._jdaviz_helper.load_data(self._file_upload.file_path) except Exception as err: self.error_message = f"An error occurred when loading the file: {repr(err)}" else: self.dialog = False - - if self.config == 'imviz': - # Do this like what Imviz does at the end of loading sequence from helper. - from jdaviz.configs.imviz.helper import link_image_data - link_image_data(self._app, link_type='pixels', error_on_fail=False)