forked from Wobbl/Bread_Editor
Implemented opening of multiple files via command line arguments.
This commit is contained in:
parent
bce4cff103
commit
5e3354fa22
1 changed files with 2 additions and 4 deletions
6
utils.py
6
utils.py
|
@ -120,11 +120,9 @@ class Utils:
|
||||||
self.load_files(self.app.settings.last_opened_files)
|
self.load_files(self.app.settings.last_opened_files)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
file_path = sys.argv[1]
|
file_paths = sys.argv[1:]
|
||||||
|
|
||||||
if os.path.isfile(file_path):
|
self.load_files(file_paths)
|
||||||
file = File(self.app, file_path, file_path.split("/")[-1])
|
|
||||||
self.app.open_files[file_path] = file
|
|
||||||
|
|
||||||
def load_files(self, file_paths):
|
def load_files(self, file_paths):
|
||||||
for file_path in file_paths:
|
for file_path in file_paths:
|
||||||
|
|
Loading…
Reference in a new issue