Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
6af04ed6
Commit
6af04ed6
authored
Oct 07, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation problems in macro editor preventing it to create new multi-line macros
parent
d1f2ebd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
pronterface.py
pronterface.py
+4
-1
No files found.
pronterface.py
View file @
6af04ed6
...
@@ -1235,6 +1235,8 @@ class macroed(wx.Dialog):
...
@@ -1235,6 +1235,8 @@ class macroed(wx.Dialog):
def
unindent
(
self
,
text
):
def
unindent
(
self
,
text
):
import
re
import
re
self
.
indent_chars
=
text
[:
len
(
text
)
-
len
(
text
.
lstrip
())]
self
.
indent_chars
=
text
[:
len
(
text
)
-
len
(
text
.
lstrip
())]
if
len
(
self
.
indent_chars
)
==
0
:
self
.
indent_chars
=
" "
unindented
=
""
unindented
=
""
lines
=
re
.
split
(
r"(?:\r\n?|\n)"
,
text
)
lines
=
re
.
split
(
r"(?:\r\n?|\n)"
,
text
)
#print lines
#print lines
...
@@ -1253,7 +1255,8 @@ class macroed(wx.Dialog):
...
@@ -1253,7 +1255,8 @@ class macroed(wx.Dialog):
return
text
return
text
reindented
=
""
reindented
=
""
for
line
in
lines
:
for
line
in
lines
:
reindented
+=
self
.
indent_chars
+
line
+
"
\n
"
if
line
.
strip
()
!=
""
:
reindented
+=
self
.
indent_chars
+
line
+
"
\n
"
return
reindented
return
reindented
class
options
(
wx
.
Dialog
):
class
options
(
wx
.
Dialog
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment