fix repaint when custom text changed

This commit is contained in:
Jakub Trllo 2023-09-04 10:56:30 +02:00
parent 34d7a4f477
commit 115dd54733

View file

@ -75,11 +75,11 @@ class MultiSelectionComboBox(QtWidgets.QComboBox):
def set_placeholder_text(self, text):
self._placeholder_text = text
self._update_size_hint()
def set_custom_text(self, text):
self._custom_text = text
self.update()
self.updateGeometry()
self._update_size_hint()
def focusInEvent(self, event):
self.focused_in.emit()
@ -266,7 +266,6 @@ class MultiSelectionComboBox(QtWidgets.QComboBox):
def _update_size_hint(self):
if self._custom_text is not None:
self.update()
self.repaint()
return
self._lines = {}
@ -313,7 +312,6 @@ class MultiSelectionComboBox(QtWidgets.QComboBox):
self.update()
self.updateGeometry()
self.repaint()
def sizeHint(self):
value = super(MultiSelectionComboBox, self).sizeHint()