Skip to content

Commit

Permalink
Minor fixes to the RotationDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
rayosborn committed Jun 23, 2024
1 parent 2376f1b commit 8c0d5a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/nexpy/gui/datadialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,8 @@ def apply(self):
class RotationDialog(NXPanel):

def __init__(self, parent=None):
super().__init__('Rotation', title='Rotation Panel', parent=parent)
super().__init__('Rotation', title='Rotation Panel', apply=False,
parent=parent)
self.tab_class = RotationTab
self.plotview_sort = True

Expand All @@ -2452,7 +2453,11 @@ def __init__(self, label, parent=None):
super().__init__(label, parent=parent)

self.plotview = self.active_plotview
self.data = self.plotview.plotdata
if self.plotview.plotdata.ndim == 1:
raise NeXusError('Rotation not possible for one-dimensional data')
else:
self.data = self.plotview.plotdata
self.aspect = self.plotview.aspect

self.parameters = GridParameters()
self.parameters.add('title', self.plotview.title, 'Title')
Expand Down

0 comments on commit 8c0d5a4

Please sign in to comment.