fix: fix missing labels after setValue (#123)

This commit is contained in:
Talley Lambert
2022-10-03 17:00:53 -04:00
committed by GitHub
parent 6f71e46914
commit a73e56bb83

View File

@@ -319,7 +319,10 @@ class QLabeledRangeSlider(_SliderProxy, QAbstractSlider):
self._reposition_labels()
def _reposition_labels(self):
if not self._handle_labels:
if (
not self._handle_labels
or self._handle_label_position == LabelPosition.NoLabel
):
return
horizontal = self.orientation() == Qt.Orientation.Horizontal
@@ -351,6 +354,7 @@ class QLabeledRangeSlider(_SliderProxy, QAbstractSlider):
label.move(pos)
last_edge = pos
label.clearFocus()
label.show()
self.update()
def _min_label_edited(self, val):