Skip to content

Commit e777071

Browse files
committed
issue of the new root feature with HSF->GSM resolved
1 parent 10d6e18 commit e777071

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

GDL.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def select_project(self, select):
135135
if select < 0: # will be -1 if panel was cancelled
136136
return
137137
self.project_folder = os.path.join(self.nr_path, folders[select])
138+
self.project_folder = folders[select]
138139
self.delegator() # go on here
139140

140141
def show_quick_panel(self, options, done):
@@ -146,9 +147,13 @@ def delegator(self):
146147
""" Delegates back to the specific calling class.
147148
Also makes the `project_folder` path absolut.
148149
"""
150+
# join with new root
151+
self.project_folder = os.path.join(self.nr_path, self.project_folder)
149152
# make absolut path, since relative paths might introduce errors
150153
self.project_folder = os.path.join(self.project_path_abs_root, self.project_folder)
151154

155+
log.debug("project_folder: " + self.project_folder)
156+
152157
# this delegates back to the calling class.
153158
self.on_done_proj()
154159

@@ -244,11 +249,16 @@ def find_hsf(self):
244249
# self.folder_to_convert = os.path.join(self.project_folder,self.folders[0])
245250
# self.on_done_file() # go on here
246251

247-
self.folder_to_convert = self.project_folder
252+
# this assumes the user follows the scheme to have a subfolder of the same name
253+
last_part_of_path = os.path.basename(os.path.normpath(self.project_folder))
254+
255+
self.folder_to_convert = os.path.join(self.project_folder, last_part_of_path)
248256
self.on_done_file() # go on here
249257

250258
def select_hsf(self, select):
251-
""" Selects on of the possible of folders of the find_hsf() def.
259+
""" ! Deprecated !
260+
Now done by super().select_project()
261+
TODO: Remove.
252262
"""
253263
folders = self.folders
254264
if select < 0: # will be -1 if panel was cancelled

0 commit comments

Comments
 (0)