Skip to content

Commit

Permalink
Fix layout input field in (Gridfinity-)Traylayout
Browse files Browse the repository at this point in the history
This was broken with cc78633 which now
requires \n in the default value to get a text area (instead of layout as
the name)

Thanks to Michael Moorhouse <https://github.com/mjmoorhouse> for
reporting!

Resolves: #635
  • Loading branch information
florianfesti committed Feb 29, 2024
1 parent 55616e2 commit 223b96f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boxes/generators/gridfinitytraylayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self) -> None:
self.argparser.add_argument("--countx", type=int, default=5, help="split x into this many grid sections. 0 means same as --nx")
self.argparser.add_argument("--county", type=int, default=3, help="split y into this many grid sections. 0 means same as --ny")
self.argparser.add_argument("--margin", type=float, default=0.75, help="Leave this much total margin on the outside, in mm")
self.argparser.add_argument("--layout", type=str, help="You can hand edit this before generating", default="");
self.argparser.add_argument("--layout", type=str, help="You can hand edit this before generating", default="\n");

def generate_layout(self):
layout = ''
Expand Down
2 changes: 1 addition & 1 deletion boxes/generators/traylayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self) -> None:
self.buildArgParser("h", "hi", "outside", "sx", "sy")
if self.UI == "web":
self.argparser.add_argument(
"--layout", action="store", type=str, default="")
"--layout", action="store", type=str, default="\n")
else:
self.argparser.add_argument(
"--input", action="store", type=argparse.FileType('r'),
Expand Down

0 comments on commit 223b96f

Please sign in to comment.