mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-11-27 11:37:57 +01:00
fix(monaco widget): reset current_file
This commit is contained in:
1 parent
3631fc2649
commit
c53d4c0ad7
1 file changed
+4
-1
@@ -110,9 +110,12 @@ class MonacoWidget(BECWidget, QWidget):
|
||||
file_name (str): Set the file name
|
||||
reset (bool): If True, reset the original content to the new text.
|
||||
"""
|
||||
self._current_file = file_name if file_name else self._current_file
|
||||
if reset:
|
||||
self._current_file = file_name
|
||||
self._original_content = text
|
||||
else:
|
||||
self._current_file = file_name if file_name else self._current_file
|
||||
|
||||
self.editor.set_text(text, uri=file_name)
|
||||
|
||||
def get_text(self) -> str:
|
||||
|
||||
Reference in new issue
Block a user