diff --git a/file.py b/file.py index 75ad6cf..3a92cb4 100644 --- a/file.py +++ b/file.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 import os.path -from PyQt6.QtWidgets import QFileDialog +from PyQt6.QtWidgets import QFileDialog, QTabWidget from editor import BitEditor MAX_FILE_SIZE = 262144 # 2^18 @@ -97,6 +97,8 @@ class File: self.app.settings.last_opened_file = self.path + self.app.gui.main_window.openFileTabs.setCurrentIndex(self.app.gui.main_window.openFileTabs.count() - 1) + def close(self): self.app.gui.main_window.openFileTabs.removeTab(self.bit_editor.tab_index) del self.app.open_files[self.path]