Skip to content

Commit

Permalink
... teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
ales-erjavec committed Mar 8, 2024
1 parent fca5ea0 commit 7f1dc01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Orange/widgets/data/utils/pythoneditor/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,11 @@ def _updateExtraSelections(self):
clear_extra_selections(selections)

def _updateVimExtraSelections(self):
QPlainTextEdit.setExtraSelections(self,
self._nonVimExtraSelections() + self._vim.extraSelections())
# breakpoint()
# if not self._terminated:
self._updateExtraSelections()
# QPlainTextEdit.setExtraSelections(self,
# self._nonVimExtraSelections() + self._vim.extraSelections())

def _setSolidEdgeGeometry(self):
"""Sets the solid edge line geometry if needed"""
Expand Down
4 changes: 3 additions & 1 deletion Orange/widgets/data/utils/pythoneditor/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ def setUp(self) -> None:
self.qpart = PythonEditor()

def tearDown(self) -> None:
self.qpart.terminate()
# self.qpart.terminate()
# QTextEdit.ExtraSelection instances still remain ref cycles.
# They need to be released before the editor widget as they
# contain text cursors with C pointers to the widget's contents
gc.collect()
delete(self.qpart)
del self.qpart
gc.collect()
super().tearDown()


Expand Down

0 comments on commit 7f1dc01

Please sign in to comment.