Skip to content

Commit

Permalink
th2_output: order -orientation before -align
Browse files Browse the repository at this point in the history
  • Loading branch information
speleo3 committed Nov 29, 2024
1 parent 663a422 commit 969ae9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/th2ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ def key_options_item(item: Tuple[str, OptionValue]) -> tuple:
return '0' + item[0], item[1]
if item[0] == 'close':
return '1' + item[0], item[1]
if item[0] == 'orientation': # point
return '1' + item[0], item[1]
if item[0] == 'projection': # scrap
return '1' + item[0], item[1]
return item
Expand Down
1 change: 1 addition & 0 deletions tests/test_th2ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def test_format_options():
assert th2ex.format_options({'author': ["2000 Max"]}) == '-author 2000 Max'
assert th2ex.format_options({'author': [("2000 Max")]}) == '-author 2000 Max'
assert th2ex.format_options({'author': [("2000", "Max Foo"), ("2000", "Jane Bar")]}) == '-author 2000 "Max Foo" -author 2000 "Jane Bar"'
assert m.format_options(m.parse_options('-align b -orientation 25.723')) == '-orientation 25.723 -align b'


def test_name_survex2therion():
Expand Down

0 comments on commit 969ae9d

Please sign in to comment.