When a file opens, it now also opens the file's tab.
This commit is contained in:
parent
ae049233c5
commit
c838b99946
1 changed files with 3 additions and 1 deletions
4
file.py
4
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]
|
||||
|
|
Loading…
Add table
Reference in a new issue