From c05013c260415bcffa9485f2f360d72d87388746 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 May 2023 13:31:53 +0530 Subject: [PATCH] Fix #2021452 [Can't Open Metadata Edit Window](https://bugs.launchpad.net/calibre/+bug/2021452) --- src/calibre/gui2/complete2.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/calibre/gui2/complete2.py b/src/calibre/gui2/complete2.py index 850733f7ae..945bf5d707 100644 --- a/src/calibre/gui2/complete2.py +++ b/src/calibre/gui2/complete2.py @@ -515,15 +515,11 @@ class EditWithComplete(EnComboBox): def text(self): return self.lineEdit().text() - - @pyqtProperty(str) - def currentText(self): - return self.lineEdit().text() - - @currentText.setter - def currentText(self, text): + def set_current_text(self, text): self.setText(text) - self.lineEdit().selectAll() + self.selectAll() + + current_text = pyqtProperty(str, fget=text, fset=set_current_text, user=True) def selectAll(self): self.lineEdit().selectAll()