Skip to content

Commit

Permalink
fix for changing RGB/noRGB
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Oct 15, 2021
1 parent f77b8b4 commit 9f24ac7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 44 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2021-10-15 Jan Kotanski <jan.kotanski@desy.de>
* fix for changing RGB/noRGB
* tagged as 2.70.1

2021-10-15 Jan Kotanski <jan.kotanski@desy.de>
* add motors tracking in the MoveMotor tool
* tagged as 2.70.0
Expand Down
87 changes: 44 additions & 43 deletions lavuelib/levelsGroupBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ def _monoLevelMode(self, status):
elif _PQGVER >= 1100:
if status:
self.__dchl = 0
if not self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('mono')
self.__levelmode = "mono"
self.updateLevels(self.__minval, self.__maxval)
if self.__histogram:
self.__histogram.switchLevelMode('mono')
# if not self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('mono')
self.__levelmode = "mono"
self.updateLevels(self.__minval, self.__maxval)
if self.__histogram:
self.__histogram.switchLevelMode('mono')

@QtCore.pyqtSlot(bool)
def _redLevelMode(self, status):
Expand All @@ -278,18 +278,18 @@ def _redLevelMode(self, status):
elif _PQGVER >= 1100:
if status:
self.__dchl = 1
if self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 1:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')
# if self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 1:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')

@QtCore.pyqtSlot(bool)
def _greenLevelMode(self, status):
Expand Down Expand Up @@ -317,17 +317,17 @@ def _greenLevelMode(self, status):
if status:
self.__dchl = 2
self._updateLevelLabels()
if self.__ui.gradientLabel.isVisible():
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 2:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')
# if self.__ui.gradientLabel.isVisible():
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 2:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')

@QtCore.pyqtSlot(bool)
def _blueLevelMode(self, status):
Expand All @@ -354,18 +354,18 @@ def _blueLevelMode(self, status):
elif _PQGVER >= 1100:
if status:
self.__dchl = 3
if self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 3:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')
# if self.__ui.gradientLabel.isVisible():
self._updateLevelLabels()
if not self.__histo:
self.__histogram.switchLevelMode('rgba')
self.__levelmode = "rgba"
if self.__channels is not None:
while len(self.__channels) < 3:
self.__channels.append(
(self.__minval, self.__maxval))
self.updateLevels(None, None, self.__channels)
if self.__histogram:
self.__histogram.switchLevelMode('rgba')

def __connectHistogram(self, iid=0):
""" create histogram object and connect its signals
Expand Down Expand Up @@ -1560,6 +1560,7 @@ def setGradientColors(self, status=True):
"""
if self.__gradientcolors != status:
self.__gradientcolors = status
self.__updateRadio(0)
self.showHistograms(self.__rgbstatus)

def gradientColors(self):
Expand Down
2 changes: 1 addition & 1 deletion lavuelib/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
""" release version """

#: (:obj:`str`) the live viewer version
__version__ = "2.70.0"
__version__ = "2.70.1"

0 comments on commit 9f24ac7

Please sign in to comment.