From 3154dd97861dec8a32979533626bc0c47617aeef Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Fri, 12 Mar 2021 12:14:11 -0500 Subject: [PATCH] Add option to load BBXRD instrument Signed-off-by: Brianna Major --- hexrd/ui/import_data_panel.py | 7 +++---- hexrd/ui/resources/ui/import_data_panel.ui | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hexrd/ui/import_data_panel.py b/hexrd/ui/import_data_panel.py index 220fa8bc0..e3b501d5b 100644 --- a/hexrd/ui/import_data_panel.py +++ b/hexrd/ui/import_data_panel.py @@ -41,7 +41,7 @@ def __init__(self, cmap=None, parent=None): self.setup_connections() def setup_connections(self): - self.ui.instruments.currentIndexChanged.connect( + self.ui.instruments.currentTextChanged.connect( self.instrument_selected) self.ui.detectors.currentIndexChanged.connect(self.detector_selected) self.ui.load.clicked.connect(self.load_images) @@ -82,10 +82,9 @@ def get_instrument_defaults(self): for det, vals in defaults['detectors'].items(): self.detector_defaults[det] = vals['transform'] - def instrument_selected(self, idx): + def instrument_selected(self, instrument): self.detector_defaults.clear() - instruments = {1: 'TARDIS', 2: 'PXRDIP'} - self.instrument = instruments.get(idx, None) + self.instrument = instrument if self.instrument is None: self.ui.detectors.setCurrentIndex(0) diff --git a/hexrd/ui/resources/ui/import_data_panel.ui b/hexrd/ui/resources/ui/import_data_panel.ui index 612cfaff1..a65b29d6b 100644 --- a/hexrd/ui/resources/ui/import_data_panel.ui +++ b/hexrd/ui/resources/ui/import_data_panel.ui @@ -68,6 +68,11 @@ PXRDIP + + + BBXRD + +