Skip to content

Commit 6d820db

Browse files
committed
TagEditorDelegate: get parent from self.parent() instead of passing it
1 parent 699fbea commit 6d820db

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

picard/ui/edittagdialog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,22 @@ def createEditor(self, parent, option, index):
100100
return None
101101

102102
tag = self.parent().tag
103-
editor = self._create_editor_based_on_tag_type(parent, tag, option, index)
103+
editor = self._create_editor_based_on_tag_type(tag, option, index)
104104
self._configure_editor_for_tag(editor, tag)
105105
return editor
106106

107-
def _create_editor_based_on_tag_type(self, parent, tag, option, index):
107+
def _create_editor_based_on_tag_type(self, tag, option, index):
108108
"""Create appropriate editor widget based on tag type.
109109
110110
Args:
111-
parent: Parent widget
112111
tag: Tag name
113112
option: Style options
114113
index: Model index
115114
116115
Returns:
117116
QWidget subclass appropriate for editing the tag
118117
"""
118+
parent = self.parent()
119119
if tag.partition(':')[0] in MULTILINE_TAGS:
120120
editor = QtWidgets.QPlainTextEdit(parent)
121121
editor.setFrameStyle(editor.style().styleHint(

0 commit comments

Comments
 (0)