Skip to content

Commit 026b9d9

Browse files
committed
new version quicfix
1 parent 722a06c commit 026b9d9

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

GDL.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,22 @@ def get_project_subroot(view):
5353
sub_root_setting = project_data.get('root', "")
5454
return sub_root_setting
5555

56-
def get_project_app_path(view):
57-
""" Returns a path to a certain Archicad version, if set in the project file.
58-
(Useful if one is developing for different Archicad versions and
56+
def get_ac_path(view, pckgset):
57+
""" Returns a path to a certain Archicad version, either from project file or the global settings.
58+
(Former is useful if one is developing for different Archicad versions and
5959
they want to use the appropiate LP Converter version.)
6060
"""
6161
project_data = view.window().project_data()
62-
app_path = project_data.get('AC_path', "")
63-
return app_path
62+
proj_ac_path = project_data.get('AC_path', "")
63+
if not proj_ac_path:
64+
ac_path = str(pckgset.get("AC_path", DEFAULT_AC_PATH))
65+
else:
66+
ac_path = proj_ac_path
67+
return ac_path
6468

6569
def err(text):
6670
""" Gives us a ST error message. """
67-
if text == None:
71+
if not text: # None or empty
6872
text = "Sorry. Something went wrong."
6973
sublime.error_message(text)
7074

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

122126
# get the path to the LP_XML_Converter right
123-
project_app_path = get_project_app_path(self.view)
124-
if project_app_path == None:
125-
self.AC_path = str(self.pckg_settings.get("AC_path", DEFAULT_AC_PATH))
126-
else:
127-
self.AC_path = project_app_path
127+
self.AC_path = get_ac_path(self.view, self.pckg_settings)
128128

129129
self.lp_conv_path = self.check_system()
130130
self.converter = os.path.join(self.AC_path, self.lp_conv_path)

Messages/v3.4.3.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
██████╗ ██████╗ ██╗
3+
██╔════╝ ██╔══██╗██║
4+
██║ ███╗██║ ██║██║
5+
██║ ██║██║ ██║██║
6+
╚██████╔╝██████╔╝███████╗
7+
╚═════╝ ╚═════╝ ╚══════╝
8+
9+
GDL Sublime Text package
10+
has successfully updated
11+
12+
*************************
13+
14+
VERSION 3.4.3
15+
16+
*************************
17+
18+
CHANGELOG:
19+
20+
# fixed
21+
• The LP_XMLConverter wasn't found under certain circumstances in 3.4.2.

messages.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
"v3.4.0": "Messages/v3.4.0.txt",
1616
"v3.4.1": "Messages/v3.4.1.txt",
1717
"v3.4.2": "Messages/v3.4.2.txt",
18+
"v3.4.3": "Messages/v3.4.3.txt",
1819
}

0 commit comments

Comments
 (0)