Skip to content

Commit

Permalink
Merge pull request mantidproject#34781 from mantidproject/32358_slice…
Browse files Browse the repository at this point in the history
…viewer_wobble

Stopped SliceViewer wobbling when moving the cursor around
  • Loading branch information
martyngigg authored Nov 29, 2022
2 parents 3d408b9 + cb1e804 commit 410b71b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed bug where the SliceViewer plot would would resize by small amounts as the cursor info changed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from qtpy.QtCore import Qt
from qtpy.QtWidgets import QWidget, QGridLayout, QVBoxLayout, QCheckBox, QLabel, QComboBox, QHBoxLayout, QStatusBar, \
QToolButton
QToolButton, QSizePolicy
from matplotlib.figure import Figure
from mpl_toolkits.axisartist import Subplot as CurveLinearSubPlot, GridHelperCurveLinear

Expand Down Expand Up @@ -99,6 +99,8 @@ def __init__(self, presenter: IDataViewSubscriber, dims_info, can_normalise, par
self.colorbar_layout.addWidget(self.colorbar_label)
norm_scale = self.get_default_scale_norm()
self.colorbar = ColorbarWidget(self, norm_scale)
# fix colour bar to stop plot and color bar making small size readjustments when the image info table updates
self.colorbar.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
self.colorbar.cmap.setToolTip("Colormap options")
self.colorbar.crev.setToolTip("Reverse colormap")
self.colorbar.norm.setToolTip("Colormap normalisation options")
Expand Down

0 comments on commit 410b71b

Please sign in to comment.