Pass elem to on_editing_finished
This commit is contained in:
parent
a77a25e6c1
commit
407af1b02c
@ -353,13 +353,17 @@ class CurCommandDispatcher(QObject):
|
|||||||
return
|
return
|
||||||
text = elem.evaluateJavaScript('this.value')
|
text = elem.evaluateJavaScript('this.value')
|
||||||
self._editor = ExternalEditor()
|
self._editor = ExternalEditor()
|
||||||
self._editor.editing_finished.connect(self.on_editing_finished)
|
self._editor.editing_finished.connect(partial(self.on_editing_finished, elem))
|
||||||
self._editor.edit(text)
|
self._editor.edit(text)
|
||||||
|
|
||||||
def on_editing_finished(self, text):
|
def on_editing_finished(self, elem, text):
|
||||||
"""Write the editor text into the form field and clean up tempfile.
|
"""Write the editor text into the form field and clean up tempfile.
|
||||||
|
|
||||||
Callback for QProcess when the editor was closed.
|
Callback for QProcess when the editor was closed.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
elem: The QWebElement which was modified.
|
||||||
|
text: The new text to insert.
|
||||||
"""
|
"""
|
||||||
if elem.isNull():
|
if elem.isNull():
|
||||||
message.error("Element vanished while editing!")
|
message.error("Element vanished while editing!")
|
||||||
|
Loading…
Reference in New Issue
Block a user