From c838b999462cec45eb2d238e68c65f77753d92eb Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sat, 30 Nov 2024 22:32:18 +0100 Subject: [PATCH] When a file opens, it now also opens the file's tab. --- file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]