Skip to content

Commit

Permalink
issue of the new root feature with HSF->GSM resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
runxel committed Apr 2, 2020
1 parent 10d6e18 commit e777071
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions GDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def select_project(self, select):
if select < 0: # will be -1 if panel was cancelled
return
self.project_folder = os.path.join(self.nr_path, folders[select])
self.project_folder = folders[select]
self.delegator() # go on here

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

log.debug("project_folder: " + self.project_folder)

# this delegates back to the calling class.
self.on_done_proj()

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

self.folder_to_convert = self.project_folder
# this assumes the user follows the scheme to have a subfolder of the same name
last_part_of_path = os.path.basename(os.path.normpath(self.project_folder))

self.folder_to_convert = os.path.join(self.project_folder, last_part_of_path)
self.on_done_file() # go on here

def select_hsf(self, select):
""" Selects on of the possible of folders of the find_hsf() def.
""" ! Deprecated !
Now done by super().select_project()
TODO: Remove.
"""
folders = self.folders
if select < 0: # will be -1 if panel was cancelled
Expand Down

0 comments on commit e777071

Please sign in to comment.