Skip to content

Commit

Permalink
new version quicfix
Browse files Browse the repository at this point in the history
  • Loading branch information
runxel committed May 8, 2020
1 parent 722a06c commit 026b9d9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
22 changes: 11 additions & 11 deletions GDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,22 @@ def get_project_subroot(view):
sub_root_setting = project_data.get('root', "")
return sub_root_setting

def get_project_app_path(view):
""" Returns a path to a certain Archicad version, if set in the project file.
(Useful if one is developing for different Archicad versions and
def get_ac_path(view, pckgset):
""" Returns a path to a certain Archicad version, either from project file or the global settings.
(Former is useful if one is developing for different Archicad versions and
they want to use the appropiate LP Converter version.)
"""
project_data = view.window().project_data()
app_path = project_data.get('AC_path', "")
return app_path
proj_ac_path = project_data.get('AC_path', "")
if not proj_ac_path:
ac_path = str(pckgset.get("AC_path", DEFAULT_AC_PATH))
else:
ac_path = proj_ac_path
return ac_path

def err(text):
""" Gives us a ST error message. """
if text == None:
if not text: # None or empty
text = "Sorry. Something went wrong."
sublime.error_message(text)

Expand Down Expand Up @@ -120,11 +124,7 @@ def run(self, *args, **kwargs):
self.pckg_settings = sublime.load_settings(PACKAGE_SETTINGS)

# get the path to the LP_XML_Converter right
project_app_path = get_project_app_path(self.view)
if project_app_path == None:
self.AC_path = str(self.pckg_settings.get("AC_path", DEFAULT_AC_PATH))
else:
self.AC_path = project_app_path
self.AC_path = get_ac_path(self.view, self.pckg_settings)

self.lp_conv_path = self.check_system()
self.converter = os.path.join(self.AC_path, self.lp_conv_path)
Expand Down
21 changes: 21 additions & 0 deletions Messages/v3.4.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

██████╗ ██████╗ ██╗
██╔════╝ ██╔══██╗██║
██║ ███╗██║ ██║██║
██║ ██║██║ ██║██║
╚██████╔╝██████╔╝███████╗
╚═════╝ ╚═════╝ ╚══════╝

GDL Sublime Text package
has successfully updated

*************************

VERSION 3.4.3

*************************

CHANGELOG:

# fixed
• The LP_XMLConverter wasn't found under certain circumstances in 3.4.2.
1 change: 1 addition & 0 deletions messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
"v3.4.0": "Messages/v3.4.0.txt",
"v3.4.1": "Messages/v3.4.1.txt",
"v3.4.2": "Messages/v3.4.2.txt",
"v3.4.3": "Messages/v3.4.3.txt",
}

0 comments on commit 026b9d9

Please sign in to comment.