From 4c7176c7521827c4f48f2694ba3337d2fe0bbcf7 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:40:03 +0100 Subject: [PATCH] remove placeholder from single selection combobox --- client/ayon_core/tools/attribute_defs/widgets.py | 4 +--- client/ayon_core/tools/utils/widgets.py | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/client/ayon_core/tools/attribute_defs/widgets.py b/client/ayon_core/tools/attribute_defs/widgets.py index 635855863c..201fd5be48 100644 --- a/client/ayon_core/tools/attribute_defs/widgets.py +++ b/client/ayon_core/tools/attribute_defs/widgets.py @@ -640,15 +640,13 @@ class EnumAttrWidget(_BaseAttrDefWidget): return self.attr_def.multiselection def _ui_init(self): - placeholder = self.attr_def.placeholder if self.multiselection: input_widget = MultiSelectionComboBox( - self, placeholder=placeholder + self, placeholder=self.attr_def.placeholder ) else: input_widget = CustomTextComboBox(self) - input_widget.set_placeholder(placeholder) combo_delegate = QtWidgets.QStyledItemDelegate(input_widget) input_widget.setItemDelegate(combo_delegate) self._combo_delegate = combo_delegate diff --git a/client/ayon_core/tools/utils/widgets.py b/client/ayon_core/tools/utils/widgets.py index 8d5a11b811..059a06648b 100644 --- a/client/ayon_core/tools/utils/widgets.py +++ b/client/ayon_core/tools/utils/widgets.py @@ -71,15 +71,8 @@ class CustomTextComboBox(ComboBox): def __init__(self, *args, **kwargs): self._custom_text = None - self._placeholder = placeholder super().__init__(*args, **kwargs) - def set_placeholder(self, placeholder: Optional[str]): - if placeholder == self._placeholder: - return - self.lineEdit().setPlaceholderText(placeholder) - self.repaint() - def set_custom_text(self, text=None): if self._custom_text != text: self._custom_text = text